473,587 Members | 2,459 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 1638
Grab the template from a friend.

"Jack Fu" <ja****@pobox.c om> wrote in message
news:eO******** ******@TK2MSFTN GP12.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.r illing.net> wrote in message
news:eq******** ******@TK2MSFTN GP11.phx.gbl...
Grab the template from a friend.

"Jack Fu" <ja****@pobox.c om> wrote in message
news:eO******** ******@TK2MSFTN GP12.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.c om> wrote in message
news:%2******** ********@tk2msf tngp13.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.r illing.net> wrote in message
news:eq******** ******@TK2MSFTN GP11.phx.gbl...
Grab the template from a friend.

"Jack Fu" <ja****@pobox.c om> wrote in message
news:eO******** ******@TK2MSFTN GP12.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.r illing.net> wrote in message
news:Oz******** **********@TK2M SFTNGP11.phx.gb l...
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.c om> wrote in message
news:%2******** ********@tk2msf tngp13.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.r illing.net> wrote in message
news:eq******** ******@TK2MSFTN GP11.phx.gbl...
Grab the template from a friend.

"Jack Fu" <ja****@pobox.c om> wrote in message
news:eO******** ******@TK2MSFTN GP12.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
5702
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
9103
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 same file (note, I did NOT recreate the database) Now I have the database back with all my data....
11
13519
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 "C:\DB2Backups" TAKEN AT 20050620000000 INTO CENT0620 REDIRECT;
18
2243
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
2005
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 classes. Are the following two classes as fast to instantiate?
0
992
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
3870
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
8547
by: Plop69 | last post by:
need some help on following: xml file 1 <TEST xmlns="http://test" > <OK>mlkddflmkj</OK> </TEST>
2
4290
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
7924
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7854
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3845
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.