Quick walkthrough on C# features.
DATA TYPES
Object Types: It is parent type of all other known types in .Net. If used as an argument in Method call then passing any type to method will cause late binding assignment to that argument.
Value and Reference Type: This type categorized on the storage of value in memory. Value Type are stored in Stack. e.g type INT, DOUBLE.
Reference types are stored in heap. e.g Type String and Object.
Converting value type into reference type called as Boxing and reverse is UnBoxing.
DECLARATION
C# allows simple and component variable declaration.
ENUMRATION
It is declared as set which are mapped to integers. This type allows us to have series which can have their mapping to unique integer value inside the set.
public enum EmployeeRole{ Trainee=0, Programmer=1, Sr Programmer=2}
Arrays: This type holds list.
e.g
int [] intArray;
OPERATORS Representing symbols for operations.
e.g Arithmetic[+, _, +], Logical[||, &&], String Concatenate[&], Increment and Decrement[+=], Comparison[<=, =>], Cast[()] etc..
FLOW CONTROL Controls the flow of your programme. e.g conditional statement [if ..else, switch], loops[while, do..while, for, foreach], functions.
CLASSES Class is type which includes all types, members, methods etc. It has visibility, its lifetime, relation, inheritance, method overloading..
REFLECTION Dynamically gather information of underlined type in late bound fashion. e.g Attributes allows to attach metadata to class and its members.
INTEROPERABILITY This feature facilitates to work with other programming language and API.
COM INTEROPERABILITY: This allows to integrate legacy components with .Net classes.
INVOKING WINDOWS API: This is same as VB6 feature to invoke and use windows API. Reference dll and create wrapper functions.
[sysimport(dll="user32.dll")] private static extern int MessageBoxA(int hwind, string Message, string caption, int Type);
STRUCTURED ERROR HANDLING This is way of handling error by blocking code. e.g
Try {} Catch(){} Finally{}
C# PREPROCESSOR This feature allows programmer to do better programming like expanding code, collapsing code…
Happy programming..
Number of View :7320Related posts:
- .Net Application With Windows Azure 1.8
- Windows azure Cloud .Net Applications
- ViewState and Server Controls ASP.NET PageLifeCycle
- Understanding the Object Oriented Programming
- Transaction Locking And Isolation In JDBC Transaction isolation levels Using Transactions JDBC Isolation Example JDBC Guide Basics Of JDBC
Tags: oops
This entry was posted on Saturday, March 30th, 2013 at 6:04 am and is filed under microsoft, OOPS, OPPS, software, Tech-Tips, Tips & Tricks. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.