Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to close Visual Studio 2010 by coding?
Ayush Nautiyal
Sep 17 2014 5:59 AM
748
Reply
I wrote a Console Application, result come, but after Enter debugging stop. but I want to close whole VS 2010 on which Console Application is written. kindly suggest me any coding or any setting to close VS 2010 .
class Demo
{
static void Main(string[] args)
{
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
Console.WriteLine("Drive {0}", d.Name);
if (d.IsReady == true)
{
long i, j, k;
i = d.TotalSize / (1024 * 1024);
j = d.AvailableFreeSpace / (1024 * 1024);
k = i - j;
// k = d.TotalFreeSpace / (1024 * 1024 * 1024);
Console.WriteLine("Total size of drive:{0, 15} MB ", i);
Console.WriteLine("Total available space:{0, 15} MB", j);
Console.WriteLine("Total Space Used:{0, 15} MB", k);
}
}
Console.ReadLine();
}
Now actually what I want that ,vs 2010 should be close when I enter to stop debug after watching output in DOS.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
List View or Details View ?
Why we need to use httphandler