Prizes & Awards
My Profile
Active Members
TodayLast 7 Days
more...
|
New Feature: Community Sites:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
|
C#.Net Basics
Posted Date: 21 Apr 2008 Resource Type: Articles Category: .NET Framework
|
Posted By: Nivas T Member Level: Gold Rating: Points: 7
|
Introduction C#.NET is component of Microsoft Visual Studio .NET. Being part of VS.net, C#.NET access common .NET library, supports all CLS features. C#.NET is fullly object oriented language which one supports inheritance, overloading, interfaces, shared members and constructors. .Net Framework is one of the primary element for software development in VS.Net environment.
.Net Functions .Net Framework is divided into CLS (Common language Runtime), Base class Library. Base Class library is organized into namespaces. An assembly may exist in the form of either DLL or .Exe.
An assembly is stored as an intermediate language (IL) file. Before running, the assembly goes through security check against the local system. After having cleared from security check, it gets loaded into memory and compiled into native code by JIT compiler. A variable in .Net can be of two types. Value type and reference type. Value type contains data of the type whereas reference type contains pointer to an instance of an object of that type. Value type is created at the time of declaration whereas reference type must be instantiated after declaration to create object. If we assign a reference type variable to another reference type variable, only reference to the object is copied, not value and both the variable will refer to the same object.
Use of 'using' keyword will allow to reference to the member of a namespace. Classes and structures contain data and methods. Methods perform data manipulation and provide behavior to classes and structures. Method can return values.
The method which returns value is called as Function and which doesn’t return value is called as Subs. Method can have parameters that are passed by value by default. We can pass parameters by reference with the ref keyword in C#.net and byref in VB.Net.
The constructor is like any method of the class, but gets created before the object is available for use. This is the first method to get called on the instantiation of the class. The Destructor is called just before an object is destroyed. It is used for code clean-up when object is no longer in use. Developer has no control when a destructor is called, since it gets called by CLR.
The Garbage Collection is responsible for automatic memory reclamation when object is no more in use. The Garbage Collection is a low-priority thread that runs in the background of the application. The GC gets high priority when memory resource is scarce. We should remember that GC is called by CLR, so developer has no control when GC is called. So, we shouldn’t rely on the code placed inside destructors or finalizers. If we need to reclaim recourses urgently, we can use dispose () method which can be called explicitly.
|
Responses
|
No responses found. Be the first to respond and make money from revenue sharing program.
|
|