コード例 #1
0
        static void Main(string[] args)
        {
            var circle1 = new MyShapes.Circle();
            var circle2 = new My3DShapes.Circle();

            The3DHexagon hexagon = new The3DHexagon();
        }
コード例 #2
0
		public static void Main (string[] args)
		{
			My3DShapes.Hexagon h = new My3DShapes.Hexagon();
			My3DShapes.Square s = new My3DShapes.Square();
			My3DShapes.Circle c = new My3DShapes.Circle();

			MyShape h2 = new MyShape(); //  B   bu şekilde de tanımlanabilir

			bfHome.BinaryFormatter b = new bfHome.BinaryFormatter();
		}
コード例 #3
0
        static void Main(string[] args)
        {
            // Circle c1 = new Circle();    // <-- name clash
            // Hexagon h1 = new Hexagon();  // <-- name clash
            // Square s1 = new Square();    // <-- name clash

            My3DShapes.Circle  c = new My3DShapes.Circle();  // OK
            My3DShapes.Hexagon c = new My3DShapes.Hexagon(); // OK
            My3DShapes.Square  c = new My3DShapes.Square();  // OK
        }
コード例 #4
0
        static void Main(string[] args)
        {
            RegularShape.Hexagon hex = new RegularShape.Hexagon();
            RegularShape.Circle  Cir = new RegularShape.Circle();
            RegularShape.Square  squ = new RegularShape.Square();

            ThreeDemensional.Hexagon hex2 = new ThreeDemensional.Hexagon();
            ThreeDemensional.Circle  cir2 = new ThreeDemensional.Circle();
            ThreeDemensional.Square  squ2 = new ThreeDemensional.Square();
        }
コード例 #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("***** Custom Namespaces *****");
            Console.WriteLine("This program has no real output,");
            Console.WriteLine("but the code files illustrate how");
            Console.WriteLine("to work with custom namespaces.");

            // This is really creating a My3DShapes.Hexagon type.
            The3DHexagon h2 = new The3DHexagon();

            bfHome.BinaryFormatter b = new bfHome.BinaryFormatter();

            Console.ReadLine();
        }