[dba-VB] Which version of Visual Studio

Michael Maddison michael at ddisolutions.com.au
Mon Nov 14 20:09:44 CST 2011


Hi Stuart,

Your code below would return the wrong result here in OZ ;-)

In .net you should probably cast to datetime and use the month property
to return either a string or int as required.
C# or VB doesn't matter though I prefer C#.  I use VB only when I have
to.

Cheers

Michael M

Me too.   I wrote something like this just yesterday:

strMonth  = Left$(Date$,2)
lngMonth = Val(strMonth)
......
'lots of  addition code using one or other of the above variables
depending on context.
....

It makes the code very easy to follow. 
And I could have written it as:
strMonth  = Left$(Date$,2)
lngMonth = Val(strmonth)

without any problem  :-)

--
Stuart

On 14 Nov 2011 at 14:28, David McAfee wrote:

> I still use it (or a variation of it), even in other languages.
> 
> 
> On Mon, Nov 14, 2011 at 2:23 PM, David Emerson <newsgrps at dalyn.co.nz>
wrote:
> 
> > Here is a related question to variable names.  I read somewhere that

> > Hungarian naming convention is not now supported by Microsoft and 
> > they prefer not to include the type as a prefix.  What could be the 
> > reason for this?  I know there are more tooltips to help identify a 
> > variable but this is no help if you are looking at printed code.
> >
> > David
> >
> >
> > At 15/11/2011, David McAfee wrote:
> >
> >> :)
> >>
> >> One of my pet peeves is when variables are used that are the 
> >> opposite case of a reserved word.
> >>
> >>
> >> String string = "StRiNg";
> >>
> >>
> >>
> >> On Mon, Nov 14, 2011 at 1:21 PM, Stuart McLachlan 
> >> <stuart at lexacorp.com.pg
> >> >wrote:
> >>
> >> > Here we go, grab your tin hats everyone and duck for cover :-)
> >> >
> >> > --
> >> > Stuart
> >> >
> >> > On 14 Nov 2011 at 13:15, David McAfee wrote:
> >> >
> >> > > Shamil, why do you prefer case sensitivity?
> >> > >
> >> > > That is one of my most common mistakes when developing in C, 
> >> > > C#, Java, Android(Java).
> >> > >
> >> > > Just wondering,
> >> > >
> >> > > David
> >> > >
> >> > > On Mon, Nov 14, 2011 at 1:05 PM, Salakhetdinov Shamil <
> >> mcp2004 at mail.ru
> >> > >wrote:
> >> > >
> >> > > > Hi Dan --
> >> > > >
> >> > > > > I do prefer VB for at least one reason:
> >> > > > > VB is not case sensitive while C#  is.
> >> > > > I'm not arguing - that's funny: I, personally, dislike 
> >> > > > VB.NETbecause it is *not* case sensitive :) (And I have been 
> >> > > > programming using
> >> VBA/VB6 for
> >> > > > 10+ years).
> >> > > > I can provide my reasoning but would it make any difference
there?
> >> > > >
> >> > > > Thank you.
> >> > > >
> >> > > > -- Shamil
> >> > > >
> >> > > >
> >> > > > 14  2011, 18:29  "Dan Waters" <df.waters at comcast.net>:
> >> > > >
> >> > > > > I do prefer VB for at least one reason: VB is not case 
> >> > > > > sensitive
> >> while C#
> >> > > > > is.  For example, the variable 'stgPerson' in VB is the 
> >> > > > > same as
> >> when you
> >> > > > > type 'stgperson'; VB will change the case for you.  But C# 
> >> > > > > sees
> >> 'stgPerson'
> >> > > > > and 'stgperson' as two separate variables, and I don't see 
> >> > > > > how
> >> that would be
> >> > > > > helpful.
> >> > > > >
> >> > > > > Good Luck!
> >> > > > > Dan
> >>
> >
> > ______________________________**_________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/**mailman/listinfo/dba-vb<http://databas
> > eadvisors.com/mailman/listinfo/dba-vb>
> > http://www.databaseadvisors.**com <http://www.databaseadvisors.com>
> >
> >
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 



_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1411 / Virus Database: 2092/4017 - Release Date: 11/14/11




More information about the dba-VB mailing list