473,513 Members | 3,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to restore the default class1.cs file in a console application?

I inadvertently changed the default class1.cs file that you get when you
create a new console project. How do I restore that default class1.cs file?
(That is, change some property or option so that when I create a new console
project, I get that default class1.cs file?)

Thanks!
Nov 17 '05 #1
4 1632
Grab the template from a friend.

"Jack Fu" <ja****@pobox.com> wrote in message
news:eO**************@TK2MSFTNGP12.phx.gbl...
I inadvertently changed the default class1.cs file that you get when you
create a new console project. How do I restore that default class1.cs file?
(That is, change some property or option so that when I create a new
console project, I get that default class1.cs file?)

Thanks!

Nov 17 '05 #2
Peter:

I'm sorry, I do not understand your answer. Could you please elaborate?

What I am trying to do is this: when I create a new console project, I want
visual studio to automatically give me a Class1.cs file that looks like
this:

Using System;
namespace < the name I entered >
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
}
}
}

Instead of getting this file, I get a more complicated one. I do not want to
more complicated one. I want the simple, default one shown above.

Thanks again for any help.
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:eq**************@TK2MSFTNGP11.phx.gbl...
Grab the template from a friend.

"Jack Fu" <ja****@pobox.com> wrote in message
news:eO**************@TK2MSFTNGP12.phx.gbl...
I inadvertently changed the default class1.cs file that you get when you
create a new console project. How do I restore that default class1.cs
file? (That is, change some property or option so that when I create a new
console project, I get that default class1.cs file?)

Thanks!


Nov 17 '05 #3
You said you modified the "default" class file, right? The default file is
simply part of a template used by VS.NET when a new project is created.

My suggestion was simply to get the default template from a VS.NET
installation that has not been modified and overrite the one on your
machine. Or you can reinstall VS.NET.

"Jack Fu" <ja****@pobox.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Peter:

I'm sorry, I do not understand your answer. Could you please elaborate?

What I am trying to do is this: when I create a new console project, I
want visual studio to automatically give me a Class1.cs file that looks
like this:

Using System;
namespace < the name I entered >
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
}
}
}

Instead of getting this file, I get a more complicated one. I do not want
to more complicated one. I want the simple, default one shown above.

Thanks again for any help.
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:eq**************@TK2MSFTNGP11.phx.gbl...
Grab the template from a friend.

"Jack Fu" <ja****@pobox.com> wrote in message
news:eO**************@TK2MSFTNGP12.phx.gbl...
I inadvertently changed the default class1.cs file that you get when you
create a new console project. How do I restore that default class1.cs
file? (That is, change some property or option so that when I create a
new console project, I get that default class1.cs file?)

Thanks!



Nov 17 '05 #4
I found a simple explanation of how to solve my problem here:
http://www.codeproject.com/dotnet/vs_templates.asp

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Oz******************@TK2MSFTNGP11.phx.gbl...
You said you modified the "default" class file, right? The default file
is simply part of a template used by VS.NET when a new project is created.

My suggestion was simply to get the default template from a VS.NET
installation that has not been modified and overrite the one on your
machine. Or you can reinstall VS.NET.

"Jack Fu" <ja****@pobox.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Peter:

I'm sorry, I do not understand your answer. Could you please elaborate?

What I am trying to do is this: when I create a new console project, I
want visual studio to automatically give me a Class1.cs file that looks
like this:

Using System;
namespace < the name I entered >
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
}
}
}

Instead of getting this file, I get a more complicated one. I do not want
to more complicated one. I want the simple, default one shown above.

Thanks again for any help.
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:eq**************@TK2MSFTNGP11.phx.gbl...
Grab the template from a friend.

"Jack Fu" <ja****@pobox.com> wrote in message
news:eO**************@TK2MSFTNGP12.phx.gbl...
I inadvertently changed the default class1.cs file that you get when you
create a new console project. How do I restore that default class1.cs
file? (That is, change some property or option so that when I create a
new console project, I get that default class1.cs file?)

Thanks!



Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5698
by: Rene | last post by:
Hi, While restoring the log we receive a message after about 30 minutes: Processed 1152109 pages for database 'restest', file 'sales_Log' on file 1 Server: Msg 9004, Leverl 21, State 20, Line 3 An error occurred while processing the log for database ' '. It is unclear why the databasename is an empty string, I guess there must be
3
9098
by: Tim Morrison | last post by:
MSDE2000 I have an application in which I am running a TSQL command of BACKUP DATABASE and RESTORE DATABASE for the backup and restore commands for my application. For testing purposes, i did the following: 1) Ran a BACKUP DATABASE command to a file named C:\TEST.BAK. 2) Deleted the database completely. 3) Ran a RESTORE DATABASE on the...
11
13480
by: Chris | last post by:
I have searched this group for answers and tried the responses. I am trying to Use an full online backup from our production server and apply it to our test server. The Tablespaces in the productions server are on the d drive and my test server has no d drive. The restore command i am using is: RESTORE DATABASE CENTRAL FROM...
18
2233
by: Clark Nu | last post by:
It seems that when I define a fuction,I can set a default value to some of the peremeters.When I call the fuction without some of them,the fuction will use the default value automaticlly then continue to work.But I'v fogot how to use,even I'v fogot whether I can use it in C# or not. Help me.
3
2002
by: Anders Borum | last post by:
Hello! When declaring variables without immediately assigning a value, the CLR (please correct here) assigns a default value according to the (reference) type of the variable (e.g. string = null, int = 0 etc.). I always assign default values to my variables, but am unsure whether this degrades the performance of the instantiation of my...
0
981
by: Jack Fu | last post by:
A year ago I changed my C# installation so that when I create a new console application, there is a default Class1 file. (I used it before for testing purposes.) I just got back to C# and I want to restore the plain-vanilla Class1 file when I create a new console project. How do I do this? Many thanks!
0
3866
by: MikeB | last post by:
Problem : I am maintaining a legacy application which is distributed with a default database, loaded from a file called Master.dat. I wish to update the values of 10 fields in 1 table. I can restore a database from Master.dat within the (C++ and SQLDMO) app. If I try to restore from command line osql, the restore fails :
12
8529
by: Plop69 | last post by:
need some help on following: xml file 1 <TEST xmlns="http://test" > <OK>mlkddflmkj</OK> </TEST>
2
4280
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be consistent, but the location that the backup file is on may vary. I have gone through the entire backup and restore process, and it
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.