//Visual Basic 2010 Properties Object Oriented Programming namespace SetProcedureAndGetFunctionInsteadOfPropertyExample { public class Person { private string m_Name; public virtual void SetName(string value) { this.m_Name = value; } public virtual void GetName() { GetName = this.m_Name; } } public class Client { void Main() { Person person1 = new Person(); person1.SetName("John"); Console.WriteLine(person1.GetName()); Console.ReadLine(); } } //Bezoek www.vbvoorbeelden.be voor meer C# voorbeelden. //Copyright - De Wolf / vbvoorbeelden - 2003-2011 - Alle rechten voorbehouden.