"Inheriting" from a structure (or macros)?

  • Thread starter Thread starter Arthur Dent
  • Start date Start date
A

Arthur Dent

Hello all...

I have a method which returns a KeyValuePair(Of Long, String). I would like
to make an alias for that, so instead of typing KeyValuePair(Of Long,
String) everywhere I could just type my alias instead.

First I thought inheritance, ... Structure MyPair Inherits KeyValuePair(Of
Long, String), but you can't inherit structures.
Next I thought Lambdas, but I don't think those really apply here.

Basically, I just want to declare another name for the (long) name
KeyValuePair(Of Long, String)

Thanks in advance,
- Arthur Dent.
 
Arthur,

Why do you then make a structure of it, as it is in fact mostly more costly.

A structure is derived from System.Value like all values, meant for small
parts that are not worth the overhead to put in the managed heap.

Cor
 
Back
Top