Global Array Structure



I am new the C# coming from a VB6 world. In VB6 I have serveral applications
where I create a UDT in a module then make an array of the UDT. All modules
and forms could access this. Now I am attempting to do this in C#. I would
like to create a Structure then an array of that, (ex. Variable[0].Name,
Variable[0].Value). But I need several classes to have access to the data.
It must be an array because I update some of the values.

Another possiblity is to have the array of strucuture in a single class that
other classes can have access to the data to update.

Can anyone point me in the right direciton.


.



Relevant Pages

  • Re: Global Array Structure
    ... In VB6 I have serveral ... >applications where I create a UDT in a module then make an array of the ... I would like to create a Structure then an array of that, ... class and the API. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Global Array Structure
    ... You will need to declare the array as public and static in order to have ... all other classes access it. ... In VB6 I have serveral ... >applications where I create a UDT in a module then make an array of the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Conversion Problem
    ... prefix is written or not depending on the exact type of the variable. ... VB6 side Ive got a xinteger array... ... the _x array is a single dimension array whose size is the same as the ... dim arr1 ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Mass delete files and directories
    ... If you look at the code I originally posted you'll see that I have used a Long at that position in the UDT and it works fine here on both my machines, but you said that it does not work on one of your four customer machines, and you also said that you had tried both Boolean and Long at that position with the same result. ... You will still have problems if you try to use any of the three remaining items in the UDT though (the three items immediately following fFlags) because they are two Longs and a String pointer and VB will "pad" the fFlags integer with two padding bytes so that the first of those Longs starts on a LongWord boundary. ... if you plan to use any of those last three entries in the UDT then you would be better off replacing all three of them with a byte array ... He changed the compatibility back to Win98/ME and it ran flawlessly. ...
    (microsoft.public.vb.general.discussion)
  • Re: Mass delete files and directories
    ... Simply replacing the three items after fFlags with a Byte Array will not solve the problem in itself. ... To be on the safe side you really do need to shift the data in the last 12 used bytes of of the UDT up by 2 bytes so that the data ends up in the position that the SHFileOperation routine expects it to be in. ... I've only got Vista here at the moment so I cannot try it on XP, but are you now saying that your call fails on all XP Home machines and that it works okay on the three XP Pro machines? ...
    (microsoft.public.vb.general.discussion)