I am reading about an article of user control at the following site:
http://msdn.microsoft.com/library/d...tproperties.asp
and i notice that in this article, they declare variant using String and
string, what is the difference? Is this the intention Microsoft want to do?
Thanks very much.'string' is an alias for 'String'. So they are equivalent.
"Green" <someone@.yahoo.com> wrote in message
news:%23XU1jnjoEHA.3728@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I am reading about an article of user control at the following site:
http://msdn.microsoft.com/library/d...tproperties.asp
> and i notice that in this article, they declare variant using String and
> string, what is the difference? Is this the intention Microsoft want to
do?
> Thanks very much.
Hi,
The fully qualified name of the .NET Framework class is System.String (see
http://msdn.microsoft.com/library/e...ClassTopic.asp).
In C# there is a keyword string
(http://msdn.microsoft.com/library/e...clrfString.asp), that
is simply an alias for System.String.
In VB if you leave Option Strict to be off you can write it in whichever
case you like and it will compile. eg string, String, STRING, sTRING,
sTrInG, STRiNG etc
Hope this helps
Martin
"Green" <someone@.yahoo.com> wrote in message
news:#XU1jnjoEHA.3728@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I am reading about an article of user control at the following site:
http://msdn.microsoft.com/library/d...tproperties.asp
> and i notice that in this article, they declare variant using String and
> string, what is the difference? Is this the intention Microsoft want to
do?
> Thanks very much.
> In VB if you leave Option Strict to be off you can write it in whichever
> case you like and it will compile. eg string, String, STRING, sTRING,
> sTrInG, STRiNG etc
Actually VB doesn't care even if you do have Option Strict On, VB is totally
case insensitive. This means your C# classes cannot have two methods that
differ only by case if you want to use them from a VB application. (There is
a CLS rule about this.)
--
Jonathan Allen
"Martin Dechev" <detcheff_@.hotmail.com> wrote in message
news:egIpY0joEHA.3592@.TK2MSFTNGP14.phx.gbl...
> Hi,
> The fully qualified name of the .NET Framework class is System.String (see
http://msdn.microsoft.com/library/e...ClassTopic.asp).
> In C# there is a keyword string
> (http://msdn.microsoft.com/library/e...clrfString.asp), that
> is simply an alias for System.String.
> In VB if you leave Option Strict to be off you can write it in whichever
> case you like and it will compile. eg string, String, STRING, sTRING,
> sTrInG, STRiNG etc
> Hope this helps
> Martin
> "Green" <someone@.yahoo.com> wrote in message
> news:#XU1jnjoEHA.3728@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> > I am reading about an article of user control at the following site:
http://msdn.microsoft.com/library/d...tproperties.asp
> > and i notice that in this article, they declare variant using String
and
> > string, what is the difference? Is this the intention Microsoft want to
> do?
> > Thanks very much.
0 comments:
Post a Comment