C# Corner

Resources  
  • Generate Unique Number in C#Jan 09, 2000. Generate a unique number using random class and display it on the console.
  • Binary Search Using ArrayList Jan 10, 2000. The ArrayList class provide binary search algorithm and more...
  • FileDownloader : Download files using HTTPJan 10, 2000. This application contains a Form and a Class module . From Form we create a thread which execute the procedure to handle the NET download. This application can be enhance to do more down load as in Download manager by creating more threads.
  • A Graphics Component in C#Jan 15, 2000. In this example we have an XYGraph Component and a form that uses it.
  • ProgressBar in C#Feb 22, 2000. You need progress bars to display the progress of your application or background tasks.
  • Creating and Using Custom Attributes in C#Feb 27, 2000. Attributes are classes that allow you to add additional information to elements of your class structure.
  • Graphics Animation SampleMay 16, 2000. After finishing a text program (lottery) its time for some fun. Everytime a have to work with a new language.I write a small program to bounce some balls in a box.
  • I'm having trouble implementing IObjectSafety. IE keeps telling me that my controls isn't safe. Why?Aug 15, 2000. This article explains about how to implement the IObjectSafety. ATL's IObjectSafetyImpl class appears to have a few bugs in it. The code below works great.
  • Creating a Class and Call it from Main ProgramSep 30, 2000. This article explains how to create your class, add some functions and call it from Main function.
  • A Simple Calculator ClassNov 28, 2000. Code sample shows how to create a simple calculator class and call it from Main C# program.
  • Get IP Address of a HostDec 03, 2000. The .Net DNS class can be used to get a host name or an IP of a given host name. To use DNS class in your project, you need to include System.Net
  • CSDownloadURL : Download Contents of a Web PageDec 03, 2000. CSDownloadURL is a class which has two functions - SetURL and DownloadURL. The set URL sets the current URL and GetDownload downloads the URL contents and returns its contents in a string.
  • Creating an Empty Project using VS.NETDec 04, 2000. This tutorial guides you towards your first C# Empty project step by step. After that I'll show you how to add a class to the project and few members to the class and call this class members from the main method.
  • Tutorial: Creating C# Class Library (DLL) Using Visual Studio .NETDec 09, 2000. This step-by-step tutorial shows you how to create a class library (DLL) in Visual Studio .NET.
  • Creating C# Class Library (DLL) Using Visual Studio .NETDec 09, 2000. This tutorial explains how to create a C# class library(dll) and call it from a C# console client application.
  • FileStream : Read or Write Data StreamsDec 13, 2000. FileStream class can be used to read/write data to a file with the help of StreamReader and StreamWriter classes.
  • Browse or Open a FileDec 15, 2000. This sample code show you how to use OpenFileDialog class to open or browse a file.
  • Adding Menu Support to a Windows FormDec 18, 2000. This sample code shows you how to use the MainMenu and MenuItem classes to add a menu and click handler for a Windows Form.
  • ColorDialog : How to use?Dec 21, 2000. Changing color of your Window and its controls is a piece of cake in C# using ColorDialog class.
  • GDI+ Tutorial for BeginnersDec 26, 2000. GDI+ is next evolution of GDI. In Visual Studio .NET, Microsoft has taken care of most of the GDI problems and have made it easy to use.
  • The Convert Class : Conversion Made Easy in .NETJan 08, 2001. The Convert class takes care of most of the data type conversions in .NET programming.
  • Calling a COM Component From C# (Late Binding)Jan 08, 2001. This code sample shows how to call a COM component in .NET framework using C#.
  • PaintBrush in C#Jan 10, 2001. The article is the paintbrush application, which demonstrates the different aspects of C# language and certain namespaces. The concepts like EventHandling and class designs are also present.
  • SmtpMail and Mail Message : Send Mails in .NET Jan 12, 2001. You can use SmtpMail and MailMessage to send mails in .NET.
  • Reading and Wtiting XML DocumentsJan 16, 2001. In this article you will see how to read and write XML documents using XML API available in .NET Framework class library.
  • Using ListViews in C#Jan 18, 2001. As a Visual C++ user for 10 years I can say that Microsoft deserves praise for their new ListView class. The MFC ListView class was, well, unpleasant to use. C# makes life a bit easier with a richer property and method set for ListViews. Also, you can now, set the ListView to select an entire row in report mode, something that in Visual C++ you had to write a whole custom ListView control to do. Note also the nice grid lines.
  • Get a database table propertiesJan 22, 2001. Get a table properties such as column names, types etc using DataColumn and DataTable.
  • A Database Access Class with Overloaded SELECT StatementsJan 24, 2001. A useful database access class with overloaded SELECT and other statements.
  • Database Explorer-IVJan 25, 2001. This is version IV of the Database Explorer, which include the support for Access Database with SQL Server.
  • How to read Windows Registry?Jan 26, 2001. In .NET, the Registry and RegistryKey classes can be used to read and write registry ...
  • Tutorial: Working with Toolbars in C#Jan 30, 2001. This tutorial explains you how to add toolbars to a form, load images to the toolbar buttons, and writing event handlers for toolbar buttons.
  • PaintBrush in C# - IIJan 30, 2001. This is a PaintBrush Application. In this Paintbrush user can draw some images and he can save the images in a persistence storage and later time can retrive the images.
  • Implementing Delegates in C#Feb 04, 2001. The Zip file contains two projects. One is VB.Net and the other is C#. Each project is an example of the same use of a delegate. A base class is derived and the delegate calls a method on several classes derived from the base class.
  • Horoscope Web ServiceFeb 08, 2001. An article talks about web services and how to develop them using .NET.
  • Implementing Delegates in C# : Part 2Feb 13, 2001. This is second part of Timothy's Delegates in C# series...
  • Schedule Program Using C#Feb 22, 2001. The Scheduling program consists of three main classes. The Form, the DatabaseController used to read and write scheduled events into the database and RowData which corresponds to data extracted from a row in the database.
  • Copying and Pasting on Clipboard using C#Feb 23, 2001. If you use CTRL+C, some data or files are copied to a system clipboard and stored in system memory and when you use CTRL+V, the data is copied back to wherever you paste it. The Clipboard class provides functionality to place and retrieve data from the system clipboard. Usually
  • Reflection in .NETFeb 26, 2001. Refelction is the mechanism of discovering class information solely at run time. Wondering where it would be useful?
  • Buton Viewer: View ImagesFeb 27, 2001. Well, In .NET, the Image class is a wonderful class to view images. No matter what control you have, you just set the Image property of that control to an image and the control will display the image. Neat?
  • Reading and Writing to the RegistryFeb 28, 2001. This is a class that both reads and writes to the registry that I made while converting some applications to use C#.
  • Effective C#: Working with StringsMar 12, 2001. Using string might degrade the performance of your application. This article explains about what precautions you should take when you are going to use strings in your application.
  • Loading a Form IconMar 13, 2001. In .NET framework, the Icon class represents a Windows icon, which is a small bitmap image used to represent an object. The icon class is defined in System.Drawing namespace.
  • Serialization Sample CodeMar 13, 2001. A class on serialization.
  • Write Relational Data to an XML FileMar 15, 2001. This article shows you how you can write data from a database to an XML file using DataSet.
  • Using Transforms with GDI+ in C#Mar 15, 2001. Transforms are matrices that allow you to rotate and translate your graphics shapes. In this example we are going to rotate a very powerful element in C# called the GraphicsPath.
  • Programming in ADO.NETMar 19, 2001. A simple example shows you how to read a database table in a dataset and display in a list view control.
  • Complex Numbers ClassMar 20, 2001. This small example demonstrates using some of the interesting language elements of the C# language.
  • ADO Vs ADO.NET Web ServiceMar 22, 2001. In this example I'd like to demonstrate one of the most interesting features of the .NET runtime - the concept of Webservices.
  • Simple Web File DownloadMar 23, 2001. This is a simple program that shows how to download files from the web and save them. The program uses the HttpWebRequest and HttpWebResponse classes to request and retrieve the requested file.
  • Simple SMTP MailerMar 26, 2001. This is a simple program which shows how to send mail via SMTP without using any framework support. While using the .NET SMTP classes may be a little easier, it is good to be able to go under the hood and get your hands dirty to understand what is going on at the socket level. For simple text messages, this implementation works fine.
  • Write XML in C#Mar 27, 2001. In this article, I will show you how to use XmlTextWriter class to create an XML document and write data to the document.
  • Reading XML FilesMar 28, 2001. In this article, I will show you how to use the XmlTextReader class to read an XML document and write data to the console.
  • Inserting Data to an XML DocumentMar 28, 2001. The XmlNode and the XmlDocument classes can be used to insert XML data to an existing document or to a new document.
  • Using Delegates to Choose Right FunctionApr 01, 2001. The need to call different class method based on some string passed to class is an old problem.
  • Web Request ClassApr 04, 2001. This is a simple application that the gets the source of a webpage via the WebRequest Object.
  • Writing Secure Code using C#Apr 06, 2001. Code access security is a mechanism that grants/denies access to resources within a method call. For example, code written by a person may be allowed to write to the disk while code from another one may be forbidden from accessing the disk. This control can be enforced even if the code written by both of them is used within a single application
  • Introduction to JScript.NETApr 09, 2001. We have been hearing the announcement from Microsoft right from PDC2000 that they have realsed new languages viz. C#, VB.NET and JScript.NET.This artice of mine is going to introduce to u JScript.NET.
  • Using Microsoft Message Queues to build Scalable SolutionsApr 12, 2001. This tutorial shows you how to create, send, and received messages using MSMQ from the .NET base class library (System.Messaging) and C#.
  • Rotation SampleApr 24, 2001. After reading Mike Golds article on transforms I thought I would get things moving a bit!
  • Understanding How Assert Effects SecurityApr 25, 2001. Assert is a security action that is evaluated at run time. Code Access Permission classes and Permission Sets support a method called Assert. Using the Assert method to control access to resources or actions will allow your code to perform actions that it normally has permission to perform and will allow other callers up stream in the call stack to have access that they would not normally have.
  • Using .NET Framework Multithreading and GDI+ to Enrich the user experienceMay 04, 2001. This tutorial shows you how to create, send, and received messages using MSMQ from the .NET base class library (System.Messaging) and C#.
  • Word Pad in C#May 11, 2001. This application explores the Rich Text control in C#,its properties and methods. Explains the usage of common dialog boxes File open, File save and Font dialog box.
  • Working With Process ClassMay 22, 2001. This article is aimed at introducing the novice .NET developer to the basic usage of System.Diagnostics services included in the .NET BCL.
  • Using Reflection and With Class2000 to view the .NET System.Drawing library Part IMay 29, 2001. Using the power of .NET and the power of COM InterOperability through WithClass 2000, you can view the System.Drawing library in a rough UML diagram.
  • Image Viewer in C#Jun 07, 2001. ImageViewer lets you to view images of types bmp, gif, jpeg, ico, wmf, emf. It also allows you to convert images to bmp, gif and jpeg formats. This application illustrates the usage of PictureBox class, Bitmap class etc.
  • GDI+ Samples: Rectangle, 3D, and EllipseJun 07, 2001. This article has three sample examples on GDI+ - Rectangle, Ellipse, and 3D.
  • Exception HandlingJun 12, 2001. Exceptions in C# provide a structured, and type-safe way of handling both system level and application level error conditions. The exception mechanism in C# is very similar to that of C++, with a few important differences.
  • Animate System Tray in C#Jun 18, 2001. I am sure those who have worked with Visual C++ would have experienced the problem of displaying an icon in system tray and manipulating with context menus for that. Previously I use to display System tray icons with Shell_NotifyIcon by filling a structure and manipulating with a context menu for that icon is another problem.
  • ADO.NET: What's changed in .NET Beta 2?Jun 20, 2001. ADO.NET API is one of the changed APIs. In this article, I've covered some of ADO.NET changes in Beta 2.
  • Time TickerJun 26, 2001. Graphics Class encapsulates a GDI+ drawing surface. The FromHWND method is used to create a new instance of the Graphics class from a window handle. Clear method fills the entire drawing surface with the specified RGB color by using Color class. DrawString method draws a string using Font and SolidBrush classes.
  • Snooping on C#.NET Regular ExpressionsJun 26, 2001. I present here two micro test utils, which will let you play with regular expressions. Regular expression( System.Text.RegularExpressions.Regex ) is a powerful class very useful for parsing, splitting or replacing texts.
  • Creating Exe on the FlyJun 29, 2001. You can create an Exe on the fly using .NET classes.
  • Working with ReflectionJul 05, 2001. This article is about the use of reflection package in Csharp. Through Reflection we can get Information about the class.
  • A Simple C# Utility to Help You Invent NamesJul 10, 2001. I wrote this simple console utility to help me think of a new name for a project I was launching.
  • Exception HandlingJul 21, 2001. Exceptions in C# provide a structured, and type-safe way of handling both system level and application level error conditions. The exception mechanism in C# is very similar to that of C++, with a few important differences.
  • Working with GDI+ Pens and FontsJul 30, 2001. The System.Drawinging.Pen and System.Drawing.Font classes represent pen and font objects in GDI+.
  • Using WebRequest and WebResponse classesJul 31, 2001. Downloading and uploading data from the web has been a very common programming practice these days.
  • Service ExplorerAug 06, 2001. This program manages services running in your computer. You can use the GetServices method on the ServiceController class to retrieve a list of the services on a particular computer.
  • Printing out your W2 Form using C# and .NETAug 07, 2001. This article covers a fairly practical aspect of using a computer - dealing with forms.
  • Printing out your W2 Form using C# and .NETAug 07, 2001. This article covers a fairly practical aspect of using a computer - dealing with forms. The concepts in this article can be used to create any Form Application so that you can design forms that you can Fill Out, Open, Save, Print and Print Preview.
  • Drawing With no OnPaint MethodAug 09, 2001. In this sample example, I draw GDI+ objects on button click.
  • CDataService: A Generic Database Access ClassAug 09, 2001. Using a generic database access component in data-aware applications can simply development and separate data tier from business tier.
  • Message Box BuilderAug 14, 2001. This program will help you using MessageBox Class. Program generates code from what you choose.
  • Super String in C#Aug 20, 2001. Today I realized that I miss those Visual Basic/Visual C++ type operators. You know the ones: Left, Mid, Right.
  • Timer Control Aug 22, 2001. The sample project attached with this article shows how to use the Timer control available in .NET and C#.
  • An insight into Code Reusability and COM Interoperability : Part IAug 28, 2001. Code reusability is the art of using existing code to achieve better productivity and ease of maintenance. The concept of reusability is not new. Its existence has been evident since the evolution of mankind.
  • Multiple Inheritance in C#Aug 29, 2001. Can you inherit from multiple classes in C#? Simply put, this cannot be done. However there are ways around it. From a design perspective you must ask yourself, will a Class fully represent an object?
  • Calendar Using DateTime ClassSep 05, 2001. The console based calendar program is a which when run shows current month's calendar using the C# Date Time Class.
  • A variety of Chart EnginesSep 07, 2001. The original code came from Scott Guthrie‚Äôs chart engine example. The differences from original code.
  • Using Attributes in C#Sep 14, 2001. This article shows how to create custom attribute classes, use them in code, and query them.
  • using Array Class and IEnumeration in C#Sep 14, 2001. This article illustrates the usage of Array class and IEnumerator. Array class Provides methods for creating, manipulating, searching and sorting arrays, thereby serving as the base class for all arrays in the common language runtime.
  • Playing with StringsSep 18, 2001. This program explores the String class and its various methods. With this you will be able to initialize strings using different constructors and use them. To see how the methods of the 'String' class work, see the following code.
  • Visual Inheritance in C#-Part1Sep 24, 2001. We all know that Inheritance means a extending a class with more Features without worrying about the implementation of features of hidden inside the class to be inherited.
  • A Simple Multi-threaded TCP/UDP Server and Client V2.Sep 24, 2001. This is the second version of my client/server program. The server and the client can be run on the same machine or on different machines. The following is the brief description of the server and the client programs specifically.
  • Working with Windows RegistrySep 25, 2001. In this small tutorial, I'll show you how to read, write and delete Windows Registry.
  • Visual Inheritance Part 2 Sep 26, 2001. We all know that Inheritance means a extending a class with more Features without worrying about the implementation of features of hidden inside the class to be inherited.
  • Adding Copyright to a GraphicsSep 28, 2001. With the popularity of digital cameras and the increase of digital archive web sites allowing you to buy images to use its handy to be able to add a copyright to your image.
  • Real Time ApplicationOct 02, 2001. The Real time Application is a sample that shows the communication techniques between a client (TcpClient) and a server (TcpServer) application using Socket class on each side. The project also demonstrates how to using listview control in the real time project.
  • Uploading and Downloading Web FilesOct 05, 2001. This program is for beginner, shows how to use web client class to Download and upload file from the Internet and how to save them to disk. Download or upload file can be done using Method DownLoad Or UpLoad.
  • Abstract Classes And MethodsOct 08, 2001. This is a detailed analysis of Abstract classes and methods in C# with some concrete examples.

About Class

A Class is set of or collection of objects which are dealing within particular Class. In Oops programming language Class word is used id used for number objects which have different-2 behaviors. Class are templates that are used to create objects and to define object data types and methods. Core properties include the data types and methods that may be used by the object. All class objects should have the basic class properties. Class are categories and objects are items within each category. A Class is used in object oriented programming to describe one or more objects. It serves as a template for creating or instantiating, specific objects within a program. While each object is created from a single class one class can be used to instantiate multiple objects. Several programming languages support Class including Java, C++, Objective C, and PHP 5 and later. While the syntax of a class definition varies between programming languages classes serve the same purpose in each language. All classes may contain variable definitions and methods, or subroutines that can be run by the corresponding object.

SPONSORED BY

C# Corner Chandigarh DevCon16
Chandigarh DevCon16 is a one-day Developer Conference where programmers, technologists, authors, and members meet, demonstrate, plan, and hang out.
techbash 2016