public partial class Student { public void Study() { } } public partial class Student { public void Socialize() { } }
public class Time { public int hourProperty // property for hour data member { get { return hour; } set { hour = ( value < 24 ? value : 0; } // value is implicit variable } private int hour; // The actual data member } // In client Time now = new Time(); int thisHour = now.hourProperty; // No explicit function call involved now.hourProperty = thisHour + 2;