UDT default property?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Can I create a UDT that has a default property? (In VB6).

I have an existing UDT, but I would like to add a property without
having to change every place that already uses it.

Example:

Type foo
....value as integer as default
....bar as integer
End Type

Dim myFoo() as foo
myFoo(1) = 42 ' (same as myFoo(1).value = 42)
.



Relevant Pages

  • Re: UDT default property?
    ... upand_at_them@xxxxxxxxx's wild thoughts were released on ... I have an existing UDT, but I would like to add a property without ... Type foo ...
    (microsoft.public.vb.general.discussion)
  • 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: I used to use VB but...
    ... udt in vb6. ... They do do a trick to make it appear they inherit from ... and use it as a variable and not do some other mumbo jumbo to ...
    (microsoft.public.vb.general.discussion)
  • 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. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Filde Data goes missing
    ... I can't see how the UDT can be at fault and a constant is ... VB6 is Great ... NET is Never Ending Trouble ...
    (microsoft.public.vb.com)