Hi,
Not sure if this is the right NG for this, but, is there a convention
for the variable names of a Session variable?
I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any
guidance appreciated.
RegardsYou can call your Session variable "Hamburger", if that "floats your boat".
What's important is that they make sense to the next developer who comes
along after you get a better job and leave...
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Control Freq" wrote:
> Hi,
> Not sure if this is the right NG for this, but, is there a convention
> for the variable names of a Session variable?
> I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any
> guidance appreciated.
> Regards
>
Control Freq wrote:
> Hi,
> Not sure if this is the right NG for this, but, is there a convention
> for the variable names of a Session variable?
> I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any
> guidance appreciated.
> Regards
Isn't there some formalized naming convention spec along these lines?
It has a name, which escapes me, but goes something like:
no spaces, use one string, starting with a lowercase character, then use
caps for each new word, i.e:
currentReportingQuarter
tblEmployees
rptMonthlySales
something like that...
Hi
The name is camel but it is not mandated for session variables. I use all
uppercase.
Mark
>
> Isn't there some formalized naming convention spec along these lines?
> It has a name, which escapes me, but goes something like:
> no spaces, use one string, starting with a lowercase character, then use
> caps for each new word, i.e:
> currentReportingQuarter
>
"mark carew" <markcarew@.magicwanddept.com.au> wrote in message
news:4oxkmvbhv8g4$.5x8sc2jiam53$.dlg@.40tude.net...
> The name is camel but it is not mandated for session variables. I use all
> uppercase.
Naming conventions aren't *mandated* for anything at all, otherwise they
wouldn't be conventions...
I thought the name was Hungarian Notation.
Bjorn
> Hi
> The name is camel but it is not mandated for session variables. I use all
> uppercase.
> Mark
Hungarian notation is a special case of pascal notation.
With Hungarian notation, you also include information in the name of the var
iable,
i.e., whether it is numeric, has a decimal value, or is text...or it is what
ever
That helps to identify the type of information being stored.
Hungarian notation is not favored by many programmers.
Another variation is Pascal notation, which capitalizes all words.
pascal notation : LikeThis
camel notation : likeThis
hungarian notation : txtLikeThis, rstLikeThis
Yet another one uses underscores : like_this or like_This or Like_This_and_T
hat
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Bjorn Sagbakken" <bjo-sag@.online.no> wrote in message news:fOWdnS152-zgXm7YRVnzvA@.telenor.
com...
>I thought the name was Hungarian Notation.
> Bjorn
>
>
"Control Freq" <nick@.nhthomas.freeserve.co.uk> wrote in message
news:1173562084.607783.190750@.c51g2000cwc.googlegroups.com...
> Hi,
> Not sure if this is the right NG for this, but, is there a convention
> for the variable names of a Session variable?
> I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any
> guidance appreciated.
I'm not sure what you mean whan you say "session variable". Do you mean
something accessed via Session["variable"] (Session("variable") in VB.NET)?
John
John Saunders wrote:
> "Control Freq" <nick@.nhthomas.freeserve.co.uk> wrote in message
> news:1173562084.607783.190750@.c51g2000cwc.googlegroups.com...
> I'm not sure what you mean whan you say "session variable". Do you mean
> something accessed via Session["variable"] (Session("variable") in VB.NET)
?
> John
>
Yes. Entries put in the Session.Item collection is generally referred to
as session variables.
Gran Andersson
_____
http://www.guffa.com
"Gran Andersson" <guffa@.guffa.com> wrote in message
news:OetX0WDZHHA.4008@.TK2MSFTNGP05.phx.gbl...
> John Saunders wrote:
> Yes. Entries put in the Session.Item collection is generally referred to
> as session variables.
Thanks, I was aware of that. I was asking the OP.
John
Monday, March 26, 2012
Session Variable naming conventions.
Labels:
asp,
conventionfor,
conventions,
names,
naming,
net,
session,
variable,
variablei
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment