Console.writeLine ("Hello C#"); } } //end of the main
Line Number wise Analysis Line - 1: - It is called as the namespace. Simply speaking, a namespace is a collection of .NET Classes similar to packages in Java. Line - 2: - It is the class declaration similar to Java & C++ Line - 3: - This is the main method which is required in all C# applications. Line - 4: - This code will print Hello C# onto the Console. Here Console is the class belonging to System namespace and writeLine is the static method belonging to Console Class. Line - 5:- The Opening and Closing curly races are similar to that of C++/Java. this.Paint+=new PaintEventHandler(Text_bru); } public void Text_bru(object sender,PaintEventArgs e) { Graphics g = e.Graphics; g.FillEllipse(bgbrush,50,50,500,300); } public static void Main() { Application.Run(new Texturedbru()); } // End of class } Working with Images You can easily insert images by following the procedure given below 1) Create an object of Bitmap class as shown below: Image img = new Bitmap("image1.bmp"); 2) Apply the above object in DrawImage() method g.DrawImage(img,20,20,100,90); Conclusion In this article, I've examined two core namespaces System.Drawing and System.Drawing.Drawing2D by showing the usage of various methods and properties with the help of numerous listings.