Nested classes
In this chapter you will learn:
Nested types
Nested types are also called inner types. To access nested type we have to use the outter type name.
using System;//j av a 2 s. c o m
class Rectangle{
public class Point{
}
}
class Test
{
static void Main()
{
Rectangle.Point p = new Rectangle.Point();
}
}
The code above creates an outer class Rectangle and then creates inner class Point.
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Class