by Dinesh Thakur Category: OOP's in C#

Method overriding means same name methods in different classes.

Polymorphism is a feature to use one name in many forms. There ·Polymorphism can be achieved in following ways in C#:

 
by Dinesh Thakur Category: OOP's in C#

Inheritance is a mechanism of sharing the members among the classes. Inheritance means taking an existing class and adding functionality by deriving a new class from it. The class you start with is called the base class, and the new class you create is called the derived class.

 
by Dinesh Thakur Category: OOP's in C#

Constructor is method of class to allocate the memory of object and initialize the variables of class.

 

When you declare a variable of a class, a special method must be called to initialize the members of that class. This method is automatically provided for every class and it is called a constructor.

 
by Dinesh Thakur Category: OOP's in C#

One can create new reference types by defining classes. Classes provide templates' from which these direct instances are generated. Where we appeal to the relation between a class and its corresponding reference type instances we shall say that a class specifies the type (also that the class specifies the constitutive elements of the type)

 
by Dinesh Thakur Category: OOP's in C#

Object-Oriented programming emphasis on data rather than function.

Object-Oriented programming was developed due to the limitations of the traditional programming approaches. The traditional programming approaches, such as Pascal, C, BASIC, FORTRAN and etc., are basically called procedural-oriented programming languages.

 
by Dinesh Thakur Category: Advanced C#

Another important and exciting feature object-oriented programming is Operator overloading. C# supports the concept of operator overloading.

Operator overloading is a concept in which operator can defined to work with the userdefined data types such as structs and classes in the same way as the pre-defined data types.



 
by Dinesh Thakur Category: Advanced C#

Application development as the name suggest is a development process. With time, new functionality is added to current applications and hence different versions of the application come to existence. Application development for quite sometime has been focused towards component oriented development. Hence an upgrade of the application definitely means an upgrade of the components. These components need to be versioned along with the application. Often components alone can face an upgrade-offering new functionality. When this happens, existing clients face a problem when the component they reference is upgraded. Net assemblies attempt to solve this problem by embedding the version information into the assembly itself. With the advanced capabilities of Windows 2000, two different assemblies can be loaded into the memory side-by-side.



 
by Dinesh Thakur Category: Advanced C#

An attribute is a declarative tag, which can be used to provide information to the runtime about the behavior of elements of application such as classes and assemblies.

 

Attributes are used to give extra information to the .NET compiler. C# and the .NET framework have a few built-in attribute types, but it is also possible to create new ones by extending the system Attribute class. Below we describe a few common uses of attributes.



 
by Dinesh Thakur Category: Advanced C#

In object-oriented languages, objects expose encapsulated functions called methods. Methods are encapsulated functions which run when they are invoked.

Sometimes, however, we think of the process of method invocation more grandly. In such a case, the method invocation is termed an 'event', and the running of the method is the 'handling' of the event. An standard example of an event is a user's selection of a button on a graphical user interface; this action may trigger a number of methods to 'handle' it

 
by Dinesh Thakur Category: Advanced C#

Delegate is a method template which used to implement the concept of function pointer.

 

The C and C++ languages are having the concept of function pointer. This was even more useful when programming for the Microsoft Windows operating systems because the Win32 library relies on the concept of callback functions. Callback functions are used in Microsoft Windows programming to process messages. For this reason and because of their functionality, callback functions were carried out in the .NET Framework but they were defined with the name of delegate.



 
by Dinesh Thakur Category: Advanced C#

An indexer is a member that enables objects to be indexed in the same as an array.

If properties are 'virtual fields', indexers are more like 'virtual arrays'. Indexers permit instances of a class or struct to be indexed in the same way as arrays. Indexers are similar to properties except that their accessors take parameters. They allow a class to emulate an array, where the elements of this array are actually dynamically generated by function calls.

 
by Dinesh Thakur Category: Advanced C#

Property is a feature to add more smartness to data fields for get and set the value.

Properties are named members of classes, structs and interfaces. They provide a flexible mechanism to read, write, or compute the values of private fields through accessors. Properties can be thought of as virtual fields. From the outside, a class' property looks just like a field. But from the inside, the property is generated using the actual class fields.

 
by Dinesh Thakur Category: Advanced C#

The Collection namespace of System contains many classes and interfaces, which provides to define various collections of objects. These interfaces and classes are useful for every programmer to develop big or large applications.

 
by Dinesh Thakur Category: C# Libraries

There are no exceptions in C arid in C++ one can get away from using them with error handling functions such as exit() and terminate(). In C# these functions are absent and we introduce exceptions which take their place. The exception handling in C#, and Java is quite similar.

 
by Dinesh Thakur Category: C# Libraries

Like java, C# also provides built-in support for multithreading. A multithread program contains two or more parts that can run concurrently. Each part of such program is called thread, and each thread defines a separate path of execution. Thus, multithreading is a specialized form of multitasking.



 
by Dinesh Thakur Category: C# Libraries

Files are the great way to store data between instances of your application, or file can be used to transfer data between applications. All input and output in the .NET framework involve the abstract base class Stream. The Stream class supports reading and writing bytes. Stream integrates asynchronous support. Its default implementations define synchronous reads and writes in terms of their corresponding asynchronous methods, and vice versa.

 
by Dinesh Thakur Category: C# Libraries

Console Input

The Console class allows using the Write () and the WriteLine () functions to display things on the screen. While the Console.Write () method is used to display something on the screen, the Console class provides the Read () method to get a value from the user. To use it, the name of a variable can be assigned to it. The syntax used is:

 
by Dinesh Thakur Category: Windows Application in C#

When the client requests a Web page for the first time, the following set of events take place:

 

1. The client browser issues· a GET HTTP request to the server.

2. The ASP.NET parser interprets the source code.

3. If the code was not already compiled into a dynamic-link library (DLL), ASP.NET invokes the compiler.

4. Runtime loads and executes the Microsoft intermediate language (MSIL) code.

                                 ASP.NET EXECUTION MODEL . 

When the user requests the same Web page for the second time, the following set of events take place:

1. The client browser issues a GET HTTP request to the server.

2. Runtime loads and immediately executes the MSIL code that was already compiled during the user's first access attempt.

 
by Dinesh Thakur Category: Windows Application in C#

Web Forms consist of a combination of HTML, code, and controls that execute on a Web server that i's running Microsoft Internet Information Services (lIS). Web Forms display a UI by generating HTML that is sent to the browser, while the supporting code and controls that run the UI stay on the Web server. This split between client-side interface and server-side code is a crucial difference between Web Forms and traditional Web pages. While a traditional Web page requires all of the code to be sent to ahd be processed at the Browser, Web Forms need to send only the interface controls to the browser ,and the page processing is kept on the server. This UI/code split increases the range of supported browsers while increasing the security and functionality of the Web page.

 
by Dinesh Thakur Category: Windows Application in C#

A Windows Forms control is a class that derives directly or indirectly from System. Windows. Forms. Control. The following list describes common scenarios for developing Windows Forms controls.

 

Page 2 of 3



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.