Use of Using Keyword?

Posted by Laghaterohan under Regular Expressions on 2/14/2011 | Points: 10 | Views : 4210 | Status : [Member] | Replies : 3
Hello,

I want to know use of Using keyword. i do know that i helps to dispose off the unused objects..But i want to ask you all that how to use / when to use using keyword in our daily coding practice apart from using it in namespace..

Thanks!

Best Regards,
Rohan Laghate



Responses

Posted by: Karthikanbarasan on: 2/14/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Check these 2 links

http://msdn.microsoft.com/en-us/library/yh598w02%28v=vs.80%29.aspx

http://msdn.microsoft.com/en-us/library/sf0df423%28v=vs.71%29.aspx

Thanks
Karthik
www.f5Debug.net

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/15/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Using means in simple language, to add reference.

Say for example if your string's function are stored in System.Text...u may want to write,

Using System;

which will also include the System.Text as Text is under-beneath of System.

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 2/15/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Using statement is used to reduce the use of complete namespace while using the classes. For example if some one has to use the FileInfo class which is in System.IO namespace instead of writing System.IO.FileInfo one can write Using System.IO; in the declaration section and then use the fileinfo class directly.


Thanks and Regards
Madhu

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response