"Andy Fish" <ajfish@blueyonder.co.uk> wrote in message
news:8g6lc.3001$_L3.28190840@news-text.cableinet.net...
> Unfortunately Ken's link just says you can't do it in .net without really
> giving you any help on where to go next
>
> basically this is not a "typesafe" operation - you are taking a block of
> memory and trying to treat it in different ways. .net does not allow you
> to
> just play fast and loose with pieces of memory like this.
>
> you will need to rewrite the code to represent the data in another way.
> for
> instance you could have an arraylist of 2 character strings and then write
> a
> method to produce the long version on demand, or you could have a single
> StringBuffer and write a method to return or replace any two-character
> pair.
>
> I suspect if you look at the requirement you will find out that the
> original
> way of doing it was not a great solution and you will be able to find a
> much
> better one using .net.
>
> if the reason it was written like this was to give very fast performance,
> you might need to experiment with several ways to do it.
>
> Andy
>
> "Ken Tucker [MVP]" <vb2ae@bellsouth.net> wrote in message
> news:us81Be$LEHA.2976@TK2MSFTNGP10.phx.gbl...
>> Hi,
>>
>>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconprogrammingelementschangesinvb7.asp
>>
>> Ken
>> -------------
>> "DH" <anonymous@discussions.microsoft.com> wrote in message
>> news:8EBDC0DE-42C5-4E5D-8459-EC856442BAD4@microsoft.com...
>> > We have a VB6 windows application. It had LSet to assign a User_Defined
>> > Type, a string, into another User_Defined Type, an Array of String. It
>> > looked like :
>> >
>> > Type tPTString
>> > PTString As String * 22
>> > End Type
>> >
>> > Type tPTArray
>> > PTArray (11) As String *2
>> > End Type
>> >
>> > Dim PTS as tPTString
>> > Dim PTA As tPTArray
>> >
>> > PTS.PTString = "ABCDEFGHIJKLMNOPQRSTU" '--22 characters
>> >
>> > LSet PTA = PTS
>> >
>> > We got PTA.PTArray(0) = "AB", PTA.PTArray(2) ="CD",......
> PTA.PTArray(11)
>> > = "TU".
>> >
>> > What correspodent Function of LSet of VB6 we can use in VB.Net (or
> sample
>> > code)?
>> >
>> > Thanks.
>> >
>>
>>
>
>