473,395 Members | 1,675 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,395 software developers and data experts.

Return pointer-array to vb.net class or any better idea?

Nip
Hello eyerybody

I have got an array of objects of the same class. These objects might be for
example visible or not. Because of the performance I donot want to check
these properties with select...case. I would solve this using an array of
pointers of which the objects have certain properties, but I have no idea
how to do this, because everything has to be compatible with vb.net. Is this
possible at all or do you have a better idea how to solve this problem?
I could write the class itself in vb, c# or c++, but it has to work...

Greetz
Lukas Cavigelli
--
http://www.cavigelli.net

Feb 19 '07 #1
1 1726
Nip <ad***@cavigelli.netwrote:
Hello eyerybody

I have got an array of objects of the same class. These objects might be for
example visible or not. Because of the performance I donot want to check
these properties with select...case. I would solve this using an array of
pointers of which the objects have certain properties, but I have no idea
how to do this, because everything has to be compatible with vb.net. Is this
possible at all or do you have a better idea how to solve this problem?
I could write the class itself in vb, c# or c++, but it has to work...
It's not at all clear what the problem is... just declare the array to
be an array of the right type, and everything should be fine.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 19 '07 #2

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

Similar topics

4
by: Thomas Junior | last post by:
Ok, I'm very confused. I expected this would return a string, but intead the following function returns a pointer: char * CPUInfo::GetVendorID () { // Return the vendor ID. switch...
14
by: Gama Franco | last post by:
Hi, I'm designing an interface for a shared library, and I would like to know if there is a standard about how to return an object to the user. I will use exceptions to report errors, so there...
14
by: William Ahern | last post by:
is this legal: FILE *func(void) { extern int errno; return (errno = EINVAL, NULL); } my compiler (gcc 2.9.x on openbsd) is complaining that i'm returning a pointer from int w/o a cast....
10
by: LaEisem | last post by:
On-the-job, I have "inherited" a lot of old C language software. A question or two about when "casting" of null pointer constants is needed has occurred during behind-the-scenes cleanup of some...
4
by: msolem | last post by:
I have some code where there are a set of functions that return pointers to each other. I'm having a bit of a hard time figuring out the correct type to use to do that. The code below works but...
12
by: subramanian | last post by:
I have taken the following prototype from K & R. void *realloc(void *p, size_t size); Suppose p was earlier allocated by malloc. Suppose I am calling realloc with larger size value. If...
15
by: Liviu | last post by:
Say i have a function: char *rmtrail(char *str) { if (str) { int i; for (i = strlen(str) - 1; i >= 0 && isspace(str); --i) ;
9
by: Francois Grieu | last post by:
When running the following code under MinGW, I get realloc(p,0) returned NULL Is that a non-conformance? TIA, Francois Grieu #include <stdio.h> #include <stdlib.h>
12
by: Carmen Sei | last post by:
Is there any way to return either NULL or a SYSTEMTIME object? will it work in C++? as in Java, one can return either NULL or an object, does C++ has something similar? Is the following code...
34
by: Davy | last post by:
Hi all, I am writing a function, which return the pointer of the int. But it seems to be wrong. Any suggestion? int * get_p_t(int t) { return &t; } int main()
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.