 |
Introduction
Before designing a class, we should have a very clear understanding about constructor. In this article I will discuss definition, types and features of constructor.
Definition
A constructor looks like a special method having no return type and its name is same with the class...
By sanjitsil
Last Message By shabbir
|
1 19,813 |
 |
Introduction
Exceptions are unforeseen errors that happen in your programs. Most of the time, you can, and should, detect and handle program errors in your code. For example, validating user input, checking for null objects, and verifying the values returned from methods are what you expect, are...
By Sanskruti
Last Message By aussiedude
|
3 14,476 |
 |
Introduction
I happen to edit the collections many times in the foreach loop and run into problems and then each time I got a different solution when going to Google, So first I would try to list each of the solution and then discuss them so that we all can have the best practice in the...
By shabbir
Last Message By shabbir
|
5 7,757 |
 |
If you program in more than one language, sometimes you want to use an phrase or expression from one language in the other, when it does not exist you have to invent it for that language. Nested functions are functions defined within functions. They can be useful for compartmentalizing behavior...
By Sanskruti
Last Message By rekha11
|
3 15,542 |
 |
When Windows developers need a unique value, they often utilize a Globally Unique Identifier (GUID). Microsoft uses the term GUID for a unique number that identifies an entity, such as a Word document.
A GUID is a 128-bit integer (16 bytes) that you can use across all computers and networks...
By pradeep
|
0 8,690 |
 |
Class overview
Microsoft documentation says the Directory class exposes static methods for creating, moving, and enumerating through directories and subdirectories. In addition, you may access and manipulate various directory attributes such as creation or last modified time stamps, along...
By pradeep
|
0 5,320 |
 |
The .NET Framework has built-in support for globalisation in its System.Globalization namespace. This namespace can help you build international support into your applications.
If you plan your applications to include support for an international audience, the cost to develop them isn't much...
By pradeep
|
0 7,932 |
 |
Generics are the most powerful feature of C# 2.0. Generics allow you to define type-safe data structures, without committing to actual data types. This results in a significant performance boost and higher quality code, because you get to reuse data processing algorithms without duplicating...
By Sanskruti
|
0 10,207 |
 |
1. Take a new C# Dll project
2. Add a new windows console application project to the solution
3. Add the following to the Dll project.
namespace BasicRefDll
{
public class SampleClass
{
/// <summary>
/// Shows the message box
/// </summary>
By shabbir
|
0 8,229 |
 |
Introduction
An event is a message sent by an object to signal the occurrence of an action. The action could be caused by user interaction, such as a mouse click, or it could be triggered by some other program logic. The object that raises the event is called the event sender. The object that...
By Sanskruti
|
0 5,937 |
 |
Introduction
LinkedList is a general-purpose linked list. It supports enumerators and implements the ICollection interface.It is a true linked list with separate nodes of type LinkedListNode, so insertion and removal are O(1) operations.
Lists that contain reference types perform better if...
By Sanskruti
|
0 46,115 |
 |
Introduction
Whenever you generate a new C# Windows Application using the .NET IDE you have the following lines in the main of your program in program.cs file. Did you ever try to note what are these and what do they do. If not I will explain to you the meaning of each line.
...
By shabbir
Last Message By shabbir
|
4 7,164 |
 |
Introduction
XML, or Extensible Markup Language, is a very popular format used to store and share data. In a nutshell, XML stores information in a tree-based text format that allows both you and I as well as computers to easily read the data. I'm sure you have used XML-like languages directly or...
By Janu
|
0 27,387 |
 |
Introduction
Classe Will be used to implement most objects.
Somtimes however, it may be desirable to create an object that behavves like one of the references. in that case, a value type used, wich is done by declaring a Struct in C#.
structs act similarly to classes, but with a few added...
By Programmer.Nick
|
0 2,639 |
 |
Introduction
Iteration Statements are often known as looping, and they run many times while specific condition is true. I would try to explain some of them here. The lesson is for a begginer, and I guess that everyone need to know them.
While
The While loop function used and while the...
By Programmer.Nick
Last Message By shabbir
|
4 4,043 |
 |
Introduction
Classes and structs can be restricted so that only the program or namespace they are declared in may use them. Class members can be restricted so that only derived classes can use them, or restricted so that only classes within the current namespace or program can use them. Access...
By shabbir
|
0 29,672 |
 |
System.Windows.Forms.Timer
1. It's a forms-based timer.
2. After creating it, you can set the interval which elapses between ticks using the Interval and hook up a delegate to its Tick event.
3. Calling Start and Stop methods, start and stop of the timer.
4. It runs entirely on the...
By shabbir
|
0 13,304 |
 |
When I started on Drag and Drop in C# I could not find much on the net and so I have decided to tackle the problem here. First follow the steps to see the working sample.
1. Create a new C sharp windows application. Rename Form1 to a suitable name. I would refer it as TestForm
2. Add a treeview...
By shabbir
Last Message By shabbir
|
33 17,814 |
 |
In my old MFC programming days we used to track the problems using the OutputDebugString and I have written my own version of OutputDebugString which accepts multiple arguments. When I started C# and .NET I wanted to know how can I do this in C sharp as well and remember that it should be as simple...
By shabbir
|
0 25,087 |
 |
Background
In C#, programmer has no control on when the destructor is going to be executed because this is determined by the Garbage Collector. The garbage collector checks for objects that are no longer used by the application and calls the destructors of all the objects and reclaims the memory...
By shabbir
|
0 4,493 |