From: John on 12 Apr 2010 11:43 Hello everybody, I am new here. I wonder if anybody could help me with a problem, since I am new to the .NET environment, coming from VB6. In Visual Basic 6 there was a very handy possibility with the TYPE command, which allowed to group variables, for instance like this : TYPE dummy dim A as Integer dim B as String dim C as Double END TYPE This allowed to write the whole group onto a binary file referencing it just by the type name. Like this : write(dummy) Since I have learned that in .NET environment there is no such thing as 'TYPE' and everything happens through classes, I wrote then : CLASS dummy A as Integer B as String C as Double END Class However, by trying to write them with write(dummy) I got an error saying that 'dummy cannot be converted to string'. I also have tried with 'structure' instead of 'class' but I got the same result. Anybody knows how I can get around this problem ? ? For the files I am using the statements : Dim fs As New IO.Filestream(filename, IO.Filemode.Create) dim bw As New IO.BinaryWriter(fs) Thanks for any help.
From: Mike Williams on 12 Apr 2010 13:31 On 12 Apr, 16:43, John <du...(a)agdp.de> wrote: > I wonder if anybody could help me with a problem, > since I am new to the .NET environment, coming > from VB6. You're in the wrong group, John. This is a Visual Basic group, the last version of which was VB6. Questions relating to the imposter should be posted to one of the imposter's own groups, such as: micrsosoft.public.dotnet.languages.vb Mike
From: John on 12 Apr 2010 18:20 On 12.04.2010 19:31, Mike Williams wrote: > On 12 Apr, 16:43, John<du...(a)agdp.de> wrote: > >> I wonder if anybody could help me with a problem, >> since I am new to the .NET environment, coming >> from VB6. > > You're in the wrong group, John. This is a Visual Basic group, the > last version of which was VB6. Questions relating to the imposter > should be posted to one of the imposter's own groups, such as: > > micrsosoft.public.dotnet.languages.vb > > Mike > Thanks for the hint, Mike. Sorry for the mistake. I'll follow your suggestion. All the best ! John.
|
Pages: 1 Prev: Referencing Flash OCX properly in vb6 Next: RTC Event in VB6 |