Conventions For Commenting?

May 3, 2009

According to conventional programming, how is it to properly comment using the '''<summary> feature built into Visual Basic?Would I have to use the part that says

''' <param name="text">Description here
''' characters in</param>
''' <returns>The description</returns>
''' <remarks></remarks>

Here is the full commenting process; is it necessary to use all of it?

''' <summary>
''' Text here
''' </summary>

[code].....

View 2 Replies


ADVERTISEMENT

.net - Commenting ASP.Net Code When Using The '_' Character?

Mar 5, 2012

This might be a really easy one but I couldn't seem to find an answer anywhere I'm trying to comment my code as follows

Session("test") = "JAMIE" _
'TEST INFO
& "TEST" _
'ADDRESS INFO
& "ADDRESS = TEST"

With the code above i'm getting the error Syntax error But when I remove the comments like so

Session("test") = "JAMIE" _
& "TEST" _
& "ADDRESS = TEST"

It works fine so my guess is that I cannot comment my code between the _ character.

View 4 Replies

Commenting A Block Of Codes /* ... */?

Feb 27, 2009

Commenting a block of codes /* ... */

View 5 Replies

IDE :: Standardize On XML Commenting For All Of Our Classes And Methods

Mar 28, 2006

My group is attempting to standardize on XML commenting for all of our classes and methods. We like the "Insert comments" option in VS 2005 but would like to add an additional tag <history> to the comments section. I know that we could probably do this manually each time we add a new class, but I would like to be able to have this new section come up automatically when we insert the comment.

[Code]...

View 1 Replies

What To Use For Naming Conventions

Mar 25, 2011

What everyone uses for naming conventions?

View 3 Replies

C# - Static Checking For Framework Conventions?

Jan 27, 2012

Is there a product/project that would allow you to define conventions for say an MVC Project to statically check for naming conventions like Controller being appended on the end of classes that inherit from controller and/or enforce a certain method signature when decorating a method with an attribute.I am basically looking for a way to kind of set up some guard rails for new developers coming onto our team where we have a clear set of conventions some of which are used to wire things up dynamically through reflection. Seeing that this reflection wire-up would fail because of an incompatible signature would be a huge boon to our ramp up process.Static/Compile time checking for broken rules Ability to target methods decorated with specific attributes (via RegEx or a Wizard)Different Sets of rules based on different types of projects.(example: A set of conventions for an MVC App, a different set for a Web Forms App, and a different set for a Class Library suffixed with .BLL)?

View 1 Replies

Naming Conventions - Name Member Variables In .NET?

Jun 9, 2010

I am generally not one to engage in subjective arguments over matters like variable naming, code formatting, etc. So I have no intention of starting an argument here.I just came across this (old) blog post which recommends not prefixing member variable names:

[Code]...

I get it: member variables can be lower camelCase, and public properties/methods can be PascalCase. But VB.NET is case-insensitive, so you can't really give a private member the same name as a public property except with a lower case first letter.I've generally prefixed member variables with an underscore, but I've been told that's not idiomatic.

So really I'm just curious: how do you name your member variables in VB.NET? And is there a "standard" way?

I'm not asking because I believe there's a "right" way or because I particularly want to change my style, and certainly not because I have any desire to tell others they're "wrong." Like I said, I'm just curious.

View 7 Replies

Class Private/Public Naming Conventions?

Mar 25, 2011

I'm relatively new to .NET and am wondering how people handle naming their private variables and the public properties that access them. Like if you want to be able to just read it, but not write to it.

[Code]...

So far I've taken to putting a 'l' (for local) in front of the all the private variables so as to be able to use the full name for the property. Is there a better way around this, or do you just always have to have different names for private variable/public properties? If so, what sort of conventions do people use?

Its not a huge deal, its just a minor annoyance and I was wondering if I was missing something.

View 4 Replies

Visual Basic 6.0 To 2008 Naming Conventions?

Jan 5, 2011

iv got visual basic 6.0 and im trying to change the naming conventions because i need to change them to 2008 standards the code is for a basic book shop.im looking ofr the code for the calcualte button on a till.you enter the title,quantity and price.then it updates for extended price 15% discount and the discounted price. There is also a running total of no of books sold and the total no of dicount given in € the code is

[Code]...

View 5 Replies

VS 2010 Proper Variable Declaration Conventions?

Jan 4, 2011

I've been programming for many years in many languages and I've seen the variable declarations conventions change. With VS 2010 I've noticed you don't have to declare the variable type. I work alone so I can use any method I want. But, someday I may want to sell some of my code so I would like to keep my programming conventions current.

In VS 2010 which of these would be considered the best convention?

Dim srtFirstName = "Bob"
Dim strFirstName As String = "Bob"
Dim FirstName = "Bob"
Dim FirstName As String = "Bob"

View 5 Replies

Dealing With Different Coding Conventions/Styles In Visual Studio?

Sep 1, 2010

I'm working on two different projects - both in VB.NET/Visual Studio 2008 (as much as I'd like to move to 2010).

I find I'm confusing the different coding standards that I'm supposed to follow. IE - Project1 wants variables named in a Hungarian-style notation like 'iSomeValue'; the does not want a prefix. One project requires an _ prefix on private class-level variables - etc...etc...

Are there any tools I can integrate with VS 2008 that will let me easily swap between pre-defined styles and format my code for me?

View 1 Replies

What Are The Conventions For Variable Naming In .NET To Avoid Confusion Between Parameters And Properties

Oct 21, 2010

In the example below, what would you name the parameter given that it is used to initialize the property FromDate?For class constructor methods, I like to have the name of the constructor parameter variable match the name of the property which is being initialized. For example, the parameter "fromDate" is used to initialize the module level variable "_FromDate" with the statement _FromDate = fromDate. Likewise, I could have alternatively written Me.FromDate = fromDate.

Proponents of C#'s case sensitivity would probably say that using a leading lower cased letter for the param variable name, which I believe is MS convention, is an acceptable approach to distinguish it from the Property of the same name but different casing.

However, VB is not case sensitive, which I generally appreciate. In the following example, I am using a param name that matches the property name, 'fromDate," and VB refers to the local instance when there is ambiguity. However, many would probably argue that this "ambiguity" introduces the opportunity for the developer to get confused and not realize which variable is being used. For example, my intent below was to have TWO params passed in, "fromDate" and "toDate" but I accidentily ommited one and as a result, the VB.NET did not warn me of the mistake because it assumed that the statement _ToDate = ToDate was equivalent to _ToDate = Me.ToDate instead of informing me that the variable on the right side of the assignment statement was undeclared.

Public Class Period
Property FromDate As Date
Property ToDate As Date

[code]....

In my judgement, we should have a convention for prefixing all parameter variable with a prefix, but hasn't the use of prefixes been discouraged by Microsoft? For example:

Public Sub New(ByVal paramFromDate As Date, paramToDate As Date)

..or maybe it could be shortened to pFromDate, pToDate...

View 3 Replies

Variable Naming Conventions To Illustrate Variable Type And Where Variables Are Declared

Aug 24, 2009

I am looking for a good resource on variable naming conventions to illustrate variable type and where variables are declared. So I will have public variables, Private variables, private or local variables. I also may want to declare variables with the same name in different class code (i.e. in the code behind different forms). I am assuming good coding would dicatate a prefix for declaration location.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved