Since you are using C#, your first stop should be the Code Options tab.
Here you should reference any libraries you intend to use (.dll) on the top pane, and their respective namespaces in the bottom pane.
It is also very important to change the Language selection to C# (bottom left drop-down), as Visual Basic seems to be the default option:
Next, here is an example of a simple concrete class with some fields, a constructor, a property and a method. You can place this code inside the Global Code window as-is:
public class SomePerson { //Class variables private string _firstName; private string _lastName; //Constructor public SomePerson(string firstName, string lastName) { this._firstName = firstName; this._lastName = lastName; } //Property public string FullName { get { return string.Format("{0} {1}", this._firstName, this._lastName); } } //Method public string Hello() { string myText = "Hello "+FullName+", it is nice to meet you."; return myText; } }
Now you will be able to call instances of this class from inside code-stages and use the property and the method. For example, you could supply the FirstName and LastName in a couple of data items in BP, and then use an instance of the SomePerson class property to get the FullName using this code:
SomePerson Anyone = new SomePerson(firstName, lastName); fullName = Anyone.FullName;
Similarly, you could use the method as follows:
SomePerson Anyone = new SomePerson(firstName, lastName); result = Anyone.Hello(
You could try all this out using a layout like this one: