473,394 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to add a File and Author details template at the top in a class by default

Say Im going to create a new class called "master.cs"

if i created this file , by default file and author information should
be added at the top of the file.

Example

-------------------------------------------------------------------------

Author :

File Created: Today Date

File Modified: Today Date

Class Name : # Class Name Here # (Here master.cs)

Description :

--------------------------------------------------------------------------
This is my template , so this template should be added in my top of the
new class wid the same

format and we should customize the template also.

Vikash

Jul 17 '06 #1
1 1408
Hi Vikash,

Are you asking how you can add a header to .cs files within a VS.NET
project? Personally, I would recommend against this unless you have an
automated solution since the overhead of maintaining the information costs
more than the value it provides and there are specialized management tools
available, external to Visual Studio, that you can use to manage projects
and source code, however you do have options:

1. If you are using Microsoft Visual SourceSafe there are special tokens you
can apply to your .cs files and VSS will automatically update the
information during check-ins:

Keyword expansion support information
http://msdn2.microsoft.com/zh-cn/library/d826hy97.aspx

List of supported keywords
http://msdn.microsoft.com/library/de...d_keywords.asp

How to enable keyword expansion
http://msdn2.microsoft.com/zh-cn/library/yhb8w83x.aspx

2. In VS.NET 2005 you can create a code snippet and using a simple command
like "header"+Enter will write your snippet and supply tokens for
replacement such as Date and Class Name where you have specified.

http://msdn2.microsoft.com/en-us/library/ms165392.aspx

3. You could create a custom VS.NET macro or addin to provide the desired
functionality.

http://msdn2.microsoft.com/en-us/library/5abkeks7.aspx

- Dave Sexton

"Vikash" <mr*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Say Im going to create a new class called "master.cs"

if i created this file , by default file and author information should
be added at the top of the file.

Example

-------------------------------------------------------------------------

Author :

File Created: Today Date

File Modified: Today Date

Class Name : # Class Name Here # (Here master.cs)

Description :

--------------------------------------------------------------------------
This is my template , so this template should be added in my top of the
new class wid the same

format and we should customize the template also.

Vikash

Jul 19 '06 #2

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

Similar topics

6
by: Patrick Kowalzick | last post by:
Dear all, I have a question about default template parameters. I want to have a second template parameter which as a default parameter, but depends on the first one (see below). Is something...
6
by: MPowell | last post by:
Lets suppose the return value on new_command is MSG2_STATUS My intent then is to memcpy the data via the call to CMDHolder and have a function that'll retrieve a copy of the 'stored' data. The...
2
by: DonMiche | last post by:
I'm having trouble producing an xml output from another xml file using xsl. The proper values are output to the browser as text with no formating or xml tags (<rowset> and <row>). Any ideas? ...
0
by: AwanJohnie | last post by:
I want to display results of a search in XML on a browser. I have created a search form using HTML to accept parameters for the field "author". I want to be able to accept this parameter in the...
10
by: BCC | last post by:
Hi, I have a tab separated value table like this: header1 header2 header3 13.455 55.3 A string 4.55 5.66 Another string I want to load this guy...
3
by: Eric Lilja | last post by:
Hello, I recently saw code like this: $ cat t.h namespace nc{ template<typename T> class Base { T hello; protected:
3
by: Abhas | last post by:
> > Hi, this is Abhas, > > I had made a video library program in C++, but was facing a problem. > > After entering 12 movies, i cannot enter any more movies. > > Something gibberish comes instead....
7
by: Cerebrus99 | last post by:
Hi all, I am confused about how to sort an XML file. I mean how to *actually* sort the data in the physical file, not how to display sorted data. I am using a large XML file as a back-end...
20
by: Johan | last post by:
How can I include one XML file into another XML file (on the client side, in Firefox)? I think XInclude is just what I need, but Firefox doesn't support it:...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
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...

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.