CSharp examples for Custom Type:Inner Type
Create and use nested class
class line// w w w . ja v a2 s .co m { public class point { public int x; public int y; } public point starting = new point(); public point ending = new point(); } class lineApp { public static void Main() { line myLine = new line(); myLine.starting.x = 1; myLine.starting.y = 4; myLine.ending.x = 10; myLine.ending.y = 11; System.Console.WriteLine("Point 1: ({0},{1})", myLine.starting.x, myLine.starting.y); System.Console.WriteLine("Point 2: ({0},{1})", myLine.ending.x, myLine.ending.y); } }