Find jobs | Jobseekers
Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Career Services Resume Services Interview questions Articles Books
Tutorial
ASP.NET | VB.NET | C#.NET     
Remoting.NET | Web service
Remoting overview | ADO.NET
UML | Sql server 
Interview questions
ASP.NET | ADO.NET | AJAX
C#.NET | VB.NET | PHP
NET Remoting | NET Interview
  
C | C++ | Java | Oops
Data Structure | OS
   
Database concepts | Oracle
SQL Server | Biztalk | Sharepoint
Notification services
Reporting Services
Service-oriented architecture
Data warehousing | MySQL
  
Project Management 
Linux | Testing | Networking
Software engineering 
  
UML | XML | HTML | SOAP 
CSS | VBScript 
   
CV Cover letter | Interview 
HR | Soft skills | GD 
Working from Home 
Tutorial
ASP.NET | VB.NET | C#.NET     
Remoting.NET | Web service
Remoting overview | ADO.NET
UML | Sql server 

C#.NET

C#.NET Tutorial

<<Previous  Next>>

By Nishant Kumar 

  • C#.NET is a major component of Microsoft Visual Studio .NET suite.  
  • Being part of VS.net suite, C#.NET can access a common .NET library and supports all CLS features.
  • C#.NET is a full object oriented language which supports inheritance, overloading, interfaces, shared members and constructors. 
  • .Net Framework is a primary element for software development in VS.Net suite.
  • .Net Framework includes loads of code required for application development.
  • .Net Framework is divided into CLS (Common language Runtime) and Base class Library.
  • CLS provides many service required for execution of application developed in .Net platform
  • Base Class library has many pre-developed classes that can be used by the developer.
  • Base Class library is organized into namespaces.
  • Assembly is a primary unit of the .Net application.
  • Assembly contains manifest which describes the assembly and its modules.
  • Modules contain source code for the application.
  • 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.
  • .Net Framework provides utility like Garbage collection.
  • 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.
  • The GC also gets ride of circular references, commonly known as memory leak.
  • Form is the basic unit of user interface. We can add form in the application at design time or run time. We can create one general parent form and can inherit forms from parent form using visual inheritance. While using visual inheritance, we ensures uniform look to all the forms of the application.
  • Forms have various properties that control their appearance, namely text, font, cursor, background Image, Opacity, backcolor and forecolor.
  • Forms have various intrinsic methods like Form.show, form.showdialog, form.activate, form.hide and form.close.
  • Form’s intrinsic methods cause changes in the visual interface and various events get raised like load, activated/deactivate, visiblechanged, closing, closed.
  • We can also create our own event handler which will get called when associated event is raised.
  • Each control on the form can have order of navigation which can be set using tabindex property of the control.
  • A control can contain other controls. For example panel, groupbox and tabpage.
  • We can resize and change position of the form and controls on it, manually. We can make use of docking and anchor properties for automatic resizing and positioning of the controls as we change size or position of the form.
  • Dock property ensures the controls to an edge of the form on change in size or repositioning of the form.
  • Anchor property ensures if controls should be fixed, floats, or change size in response to the change in size of form.
  • We can create control at run-time by declaring control and instantiating of the type. We can then add instantiated control to the control collection of the form.
  • Each control’s property on the form can be enhanced by using Extender Provider component. These properties mostly used to provide information to the user like help or tool tip.
  • Menu is the best navigation way in the application. We can create MainMenu control that allows rapid creating of menu for the application. Developer can apply separator bars, access keys and shortcut keys.
  • Context menu allows us to get access to various commands on the specific situation.
  • Developer can create this kind of menu same as MainMenu but at run-time.
  • We can control the menu dynamically at run-time. We can enable and disable the menu items, make menu items invisible etc. We can change the structure of menu dynamically at run-time by creating new menu with the CloneMenu method.
  • We can have form-level validation as well as field level validations.
  • We can validate each field as data entered using field-level validation.
  • We can validate all fields of the form at one shot using form-level validation.
  • The textbox control contains properties like MaxLength, PasswordChar, ReadOnly, Multiline. These properties are used to restrict user to enter unwanted data in the field. Developer can tap keyboard events of the control like Keydown, KeyUp and Keypress.
  • Developer can validate character input by using static methods of char structure like char.IsDigit, CharIsletter, Char.Islower, Char.IsUpper etc.
  • The CauseValidation property of the control allows us to disable the event to occur. The event occurs only when CauseValidation property of the control is set to true.
  • We can set CancelEventArgs.Cancel property to true in the event handler to restrict focus from moving away from the control.
  • The ErrorProvoider component of the control can be used at run time for displaying informative error message to the user.


<<Previous  Next>>

Related Links

>NET Access Modifiers
>Net Architecture
>NET Assemblies and Resources
>NET Base class library
>NET Binding, viewing, filtering
>NET Class and Structures
>NET Common Language Runtime
>NET Configuring and optimizing
>NET Configuring setup project
>NET Constants, Enum, Arrays, collection
>NET Constructors and destructors
>NET Control
>NET Dataset objects
>NET Data Types
>NET Debugging Tools
>NET Debug and trace classes
>NET Delegates and events
>NET Exception handling
>NET Form
>NET Garbage collection
>NET Globalization and localization
>NET Interoperability
>NET Menu
>NET Project Deployment
>NET Properties
>NET Securing Application
>NET Using XML in ADO.NET
>NET Validating User Input
>NET Windows communication foundation
>Net Windows presentation foundation
>Net Windows workflow foundation

Understanding Anonymous Types

Anonymous types defined with var are not VB variants. The var keyword signals the compiler to emit a strong type based on the value of the operator on the right side. Anonymous types can be used to initialize simple types like integers and strings but detract modestly from clarity and add little value..............


 
Today's Hot Jobs
C++  SQL Server
.NET  Java  Oracle
Finance  Marketing
Seekers  Employers
Copyright © 2008 CareerRide.com. All rights reserved.