Click here to Skip to main content
12,243,333 members (54,338 online)
Click here to Skip to main content
Add your own
alternative version

Stats

16.9K views
179 downloads
12 bookmarked
Posted

Code Snippet for Page Heading Comments.

, 27 Aug 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
This is just a Code Snippet for Page Heading Comment to manage the code efficiently

Introduction

This article/code snippet is use full in managing your code properly. like every class file should contain any comment about auther ,created date and other things. This Article contain two code snippet one is C# and other one is Vb.Net.

Background

Code Snippet are just xml file which we are using in your coding to display predefine code.

Using the code

every coding file (.cs or .vb) should contain the information about auther,created by namespace and other things.

Copy the attached file for following Locations
.
Location for Vb Code Snippet:
C:\Program Files\Microsoft Visual Studio 8\VB\Snippets\1033\application

Location for C# Code Snippet:
C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#
How to use The Code snippet.
For VB.NET
go to your any .vb page and right click at the top line of page.
then click on Insert Snippet. --> Select Application --> Select "#PageHeader"
then write down all the values mentioned at Snippet literals.
For C#
go to your any .cs page and right click at the top line of page.
then click on Insert Snippet. --> Select Visual C# --> Select "#PageHeader"
then write down all the values mentioned at Snippet literals.
if you still find any problem then feel free to talk with me.

Code Snippet

if you find any proble in attached file then copy the following code.

C# Code Snippet.

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="<a href="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet</a>">
 <CodeSnippet Format="1.0.0">
  <Header>
   <Title>#Pageheader </Title>

VB.NET Code Snippet.

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="<a href="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet</a>">
 <CodeSnippet Format="1.0.0">
  <Header>
   <Title>#Pageheader </Title>
   <Shortcut>#Pageheader</Shortcut>
   <Description>Code snippet for Page Heading Details</Description>
   <Author>Rajesh (<a href="mailto:rsoni1980@yahoo.com)</Author">rsoni1980@yahoo.com)</Author</a>>
   <SnippetTypes>
    <SnippetType>Expansion</SnippetType>
    <SnippetType>SurroundsWith</SnippetType>
   </SnippetTypes>
  </Header>
  <Snippet>
   <Declarations>
    <Literal>
     <ID>ClassName</ID>
     <ToolTip>Class Name</ToolTip>
     <Default>MyClass</Default>
    </Literal> 
    <Literal>
     <ID>CreatedBy</ID>
     <ToolTip>Name of the Creator</ToolTip>
     <Default></Default>
    </Literal>   
    <Literal>
     <ID>CreatedOn</ID>
     <ToolTip>Date of Creation</ToolTip>
     <Default></Default>
    </Literal>   
    <Literal>
     <ID>Interfaces</ID>
     <ToolTip>Interfaces on which it is implemented</ToolTip>
     <Default>None</Default>
    </Literal>   
    <Literal>
     <ID>BaseClass</ID>
     <ToolTip>Base Class Name</ToolTip>
     <Default>None</Default>
    </Literal>   
    <Literal>
     <ID>Purpose</ID>
     <ToolTip>Purpose of this Class </ToolTip>
     <Default></Default>
    </Literal>   
   </Declarations>
   <Code Language="VB"><![CDATA[#Region "Page Header" 
'Class Name : $ClassName$
'Created By : $CreatedBy$
'Created On : $CreatedOn$
'Interfaces : $Interfaces$
'BaseClass  : $BaseClass$
'Purpose    : $Purpose$
'Version:     Version            When               Who            Why
'             1.0             $CreatedOn$     $CreatedBy$        Initial Draft.
'
#end Region ]]>
   </Code>
  </Snippet>
 </CodeSnippet>
</CodeSnippets>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

talk2rsoni
Architect
India India
Rajesh Soni
Specialties: | MCPD- SharePoint 2010
| MCTS - MOSS 2007,WSS 3.0
| MCTS - ASP.NET 2.0
| HTML5,AngularJS,JQuery
| Dot NET 3.5 / 4.0

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 27 Aug 2007
Article Copyright 2007 by talk2rsoni
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid