[Help needed] C#

03/23/2010 19:45 jackpotsvr#1
Hey guys! I'm learning C# and now i would like to know how to use .dll's with my form. Now i watched this
on youtube, but i got an error and don't know how to fix it/what i do wrong.

This was source code of the DLL (here was no problem with building)

Quote:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Function
{
public class Function
{
public string MESG = "Succesfully Logged in!";
}
}
And this was from the Form
Quote:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Function;
namespace Starter
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


private void

DLL;Function MEGH = new.Function();
MessageBox.Show (MEHG.MESG);

}
}

As you can see in the picture down here i created the Reference.
In the screenshot down here you see the errors!

[Only registered and activated users can see links. Click Here To Register...]

Please help me!
03/23/2010 21:22 Nullable#2
Hope I understood this correctly.. anyways after adding references to your dll, you should be able to make instances of public classes easily:
Code:
using Function;
Function.Function MyFunction = new Function.Function();
MessageBox.Show(MyFunction.MESG);