C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Tips » Visual Studio »

Usage of using key word


Posted Date: 18 Aug 2009    Resource Type: Tips    Category: Visual Studio
Author: VeerabaguMember Level: Gold    
Rating: 1 out of 5Points: 3



Usage of using key word



if you are handling with dataset or datatable in your code all are suggest to donot forget dispose like that
that is the good suggestion because it will occupy more memory

example for without using keyword


DataSet ds = new DataSet();
ds.Dispose ();



example for with using keyword

using (DataSet dss = new DataSet())
{
ds.Tables[0].Rows[0][0] = "veera";
}


in first example we are using dispose method to dispose the dataset object but in second example we are not using dispose method
because using () keyword automatically dispose the dataset object

so if you forget to dispose always you use using keyword it will automatically do

:) donot worry about dispose using keyword take care of it


Regards
Veera



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Usage of using key word  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Toggle Outlining Shortcut
Previous Resource: Change the Background Row Color of the GridView control using MouseEvents
Return to Discussion Resource Index
Post New Resource
Category: Visual Studio


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use