Easy Questions for CPians
-
:laugh: Wich is better :
Dim myAdapter as oledbDataAdapter = new oledbDataAdapter("bla bla")
orDim myAdapter as new oledbDataAdapter("Bla bla")
.:doh: -
:laugh: Wich is better :
Dim myAdapter as oledbDataAdapter = new oledbDataAdapter("bla bla")
orDim myAdapter as new oledbDataAdapter("Bla bla")
.:doh:Neither. They produce exactly the same IL code. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Neither. They produce exactly the same IL code. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
And Integer.Parse or CINT OR CTYPE ?
-
And Integer.Parse or CINT OR CTYPE ?
These three functions don't do the same things, so your trying to compare apples to oranges to banana's. Integer.Parse attempts to create an 32-bit signed integer out of a text string. CInt attempts to convert the value of a numeric datatype into a signed 32-bit integer value. CType attempts to convert one datatype into another datatype. This works with numeric types, objects, structures, classes, interfaces, ... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
These three functions don't do the same things, so your trying to compare apples to oranges to banana's. Integer.Parse attempts to create an 32-bit signed integer out of a text string. CInt attempts to convert the value of a numeric datatype into a signed 32-bit integer value. CType attempts to convert one datatype into another datatype. This works with numeric types, objects, structures, classes, interfaces, ... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
ok thanks a lot :) You really are a very helpfull resources :) Now for the last question :
Dim ocls as Classname
orPrivate (public etc..) ocls as Classname
in the Code-Behind (not in methods). I'm sorry for all those question, it's just thing i havent paid attention, in my learning process. -
ok thanks a lot :) You really are a very helpfull resources :) Now for the last question :
Dim ocls as Classname
orPrivate (public etc..) ocls as Classname
in the Code-Behind (not in methods). I'm sorry for all those question, it's just thing i havent paid attention, in my learning process.At this level, both of your statements generate the exact same code. If
Public
orPrivate
is specified, theDim
keyword becomes optional. If there is no access modifier specified,Dim
must be used and the variable isPrivate
by default. These three statements do the exact smae thing:Class myClass
Private Dim mstrLine1 As String
Private mstrLine2 As String
Dim mstrLine3 As String
End ClassRageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
At this level, both of your statements generate the exact same code. If
Public
orPrivate
is specified, theDim
keyword becomes optional. If there is no access modifier specified,Dim
must be used and the variable isPrivate
by default. These three statements do the exact smae thing:Class myClass
Private Dim mstrLine1 As String
Private mstrLine2 As String
Dim mstrLine3 As String
End ClassRageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Great, thank you very much.:)