473,385 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

"Inheriting" from a structure (or macros)?

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.

Jun 27 '08 #1
1 1611
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

"Arthur Dent" <hi*********************@yahoo.comschreef in bericht
news:E6**********************************@microsof t.com...
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.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
by: michele.simionato | last post by:
Paul Rubin wrote: > How about macros? Some pretty horrible things have been done in C > programs with the C preprocessor. But there's a movememnt afloat to > add hygienic macros to Python. Got any...
37
by: seberino | last post by:
I've been reading the beloved Paul Graham's "Hackers and Painters". He claims he developed a web app at light speed using Lisp and lots of macros. It got me curious if Lisp is inherently faster...
3
by: Generic Usenet Account | last post by:
I have written a small macro that provides the relative offset of any field within a structure. Here it goes: #define RELATIVE_OFFSET(a,b) \ { \ cout << "The relative offset of the " \ <<...
19
by: Ross A. Finlayson | last post by:
Hi, I hope you can help me understand the varargs facility. Say I am programming in ISO C including stdarg.h and I declare a function as so: void log_printf(const char* logfilename, const...
7
by: Randy Yates | last post by:
Hi, I work in an embedded environment in which we often use a mix of C and assembly code. Thus a recurring requirement is to be able to take a C header file with structure definitions as input...
5
by: Andreas Micheler | last post by:
Hi, I have several long complex C macros in the math module of aUCBLogo like #define _XFUNC_primitive(NAME)\ NodeP _##NAME(PairPP arg)\ { ((ObjectP)(arg))->var()->NAME( arg );\ return...
28
by: liorm | last post by:
Hi everyone, I need to write a web app, that will support millions of user accounts, template-based user pages and files upload. The client is going to be written in Flash. I wondered if I coudl...
16
by: fuiwong | last post by:
Can i create a constructor in a data structure? does the following codes right? sample code #include <iostream.h> struct USERID{ char UserName; char Password; char LoginName; char...
1
by: atbusbook | last post by:
macros are sort of like c macros but more powerful. they are the manafestation of treating code like data. lisp code is just a textual representation of a data structure that is the list. this...
2
by: emitrax | last post by:
Hi there, is there any difference between using bit fields structure and plain variable plus macros for dealing with bits? Let's say I have a two bytes divided as follow 0 - 2: level 3 -...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.