Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Oct 27, 2003 13:32:04 GMT -5
Okay I'm bored and just wanted something to do so I thought I'd ask a few questions about vb .net an let everyone see if they could answer them. Feel free to add any questions of your own I will answer these questions when I get home from work tonight.
[General VB .Net Question] What is the difference between referencing and importing?
[ADO .Net] What is the new alternative to recordset. ( Hint: it is connectionless )
[IO Question] In vb net there are now classes ( in the System.IO namespace ) for reading and writting files. Name these classes.
[Arrays of Objects] In vb 6 objects ( buttons, classes, usercontrols ) had an index property in which you could create a control array. In vb .net this is no longer available. Explain how you would create objects dynamically an how you would reference to each one.
|
|
Maverick
New Member
www.mavetech.tk
Posts: 174
|
Post by Maverick on Oct 27, 2003 14:47:31 GMT -5
In VB6 u used to do
Form1.Text1.text = "TExt" from Form2 this is the easiest question. even easier than Tewl's
How can u do this in VB.NEt Note: u can do the same in vb.net as in vb6
have fun
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Oct 27, 2003 15:23:45 GMT -5
Well the answer to your question would be something like this.
You must either declare a global instance of form1 that form2 can get access to or pass a reference of form1 to form2 ( eg. pass form1 in the form2 constructor ). The syntax is basically the same.
In addition in vb6 you could do Text1 = "test" because the text property was the default property in visual basic .net you must specifiy the property because default properties no longer exist.
|
|
|
Post by AbsoluteGenius on Oct 27, 2003 19:12:46 GMT -5
Guess what!!!
I am sticking with VB6 sod VB.NET - talk about making things less friendly.
|
|
|
Post by KingpinX on Oct 27, 2003 21:13:34 GMT -5
god dammit i want to get my hands on the .net disc 1 and 6-7 i got the rest just so i can complain about how rosygardeny it is ;D
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Oct 27, 2003 21:26:46 GMT -5
AG: I already knew you were hard headed
|
|
|
Post by Dangermouse on Oct 28, 2003 3:02:00 GMT -5
lol Tewl. I was waiting for you to reply that VB6 programs wont work in a few years...64bit blah blah blah
|
|
|
Post by AbsoluteGenius on Oct 28, 2003 4:42:10 GMT -5
bah humbug!!!!
|
|
Maverick
New Member
www.mavetech.tk
Posts: 174
|
Post by Maverick on Oct 28, 2003 4:54:36 GMT -5
lmfao... true danger AG if u want your programs to work after Longhorn u shud update
|
|
Pepper
New Member
meep meep...!
Posts: 444
|
Post by Pepper on Oct 28, 2003 8:41:54 GMT -5
i goth em both
|
|
|
Post by KingpinX on Oct 28, 2003 10:01:16 GMT -5
what connection you got pepper .....and which edition of .net you have? Enterprise is the only one people should get..... talk to ya on msger about something
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Oct 28, 2003 11:00:38 GMT -5
Gah no of you kno anything do ya [General VB .Net Question] Q: What is the difference between referencing and importing? A: Referencing an allows u to have access to the libraries in the namespace but if you also import the reference you do not have to type out the full namespace ( eg. System.Windows.Forms.Textbox ) [ADO .Net] Q: What is the new alternative to recordset. ( Hint: it is connectionless ) A: Dataset [IO Question] Q: In vb net there are now classes ( in the System.IO namespace ) for reading and writting files. Name these classes. A: Stream, Streamwriter, StreamReader, BufferedReader, TextReader, TextWriter, StringReader, StringWriter, BinaryReader, BinaryWriter [Arrays of Objects] Q: In vb 6 objects ( buttons, classes, usercontrols ) had an index property in which you could create a control array. In vb .net this is no longer available. Explain how you would create objects dynamically an how you would reference to each one. A: There are several ways of doing this oen of my favorites would be to create a new object ( object myobject = new myObject ), set all the paramaters, probably set the tag or text property to somethign i can use to identify it uniquely, then add it to an Vector
|
|
Maverick
New Member
www.mavetech.tk
Posts: 174
|
Post by Maverick on Oct 28, 2003 11:32:47 GMT -5
lol tewl... we havent switched to .net fully... i wud rather stick with VB a little bit
|
|