473,513 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert myObject.Parameter to string "myObject.Parameter"

Hi,

Is it possible to pass in an object and parameter into a function and
return it as a string.

i.e.

To make a call to the function i would put the following

Dim str as String = MyTestFunction(myObject.Parameter)

str should equal "myObject.Parameter"

if myObject was of type myObj, then str should return "myObj.Parameter"

Thanks

Nov 24 '06 #1
2 1441
Hello, Nemisis!

What type has myObj.Property?

IMO to accomplish what you want you have to pass
to MyTestFunction not only propery value, but the whole type.

NHi,

NIs it possible to pass in an object and parameter into a function and
Nreturn it as a string.

Ni.e.

NTo make a call to the function i would put the following

NDim str as String = MyTestFunction(myObject.Parameter)

Nstr should equal "myObject.Parameter"

Nif myObject was of type myObj, then str should return
N"myObj.Parameter"

NThanks


--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Nov 24 '06 #2

Vadym Stetsyak wrote:
Hello, Nemisis!

What type has myObj.Property?

IMO to accomplish what you want you have to pass
to MyTestFunction not only propery value, but the whole type.
Vad,

Maybe i have not explained to well. If i run the code below, what code
would i need in the function.

Dim A As Company = Company.GetCompany(6) ' 6 is the Id of the
company

Dim str as String = ReturnClassAndPropertyAsString(A.Name)

str should be equal to "Company.Name".

I believe i would have to use reflection for this? but i am not sure
if maybe there is a simpler solution that i do not know about.

Nov 27 '06 #3

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

Similar topics

3
3046
by: Mysooru | last post by:
Hi All, One of the ATL class..... template <class Base> class CComObject : public Base { public: typedef Base _BaseClass;
3
2017
by: Ian Lazarus | last post by:
// why is the error message being generated? // Microsoft Visual C/C++ 5.0 class Bar { public: void Log(const char* p){ } }; class Foo : public Bar
2
2736
by: John A Grandy | last post by:
Is there something special in XML about the name "Parameter" ... I am not able to XPATH query for nodes named "Parameter" <Root> <Category CategoryID="1"> <Elements> <Element...
9
3498
by: Igor Okulist | last post by:
int func(void**); { short* p = NULL; func(&p); //<<< here } Could somebody remind me why is this not allowed ? error message: "cannot convert parameter from 'short **' to 'void **'"
8
8974
by: eminemence | last post by:
Hi, I have been trying to get STLPort work for Symbian. I am using CodeWarrior compiler and it spews this errors namely *************************************************************************...
5
3018
by: Brahm | last post by:
hi folks ! What is the equivalent parameter in vb 2005 for "any" from vb 6 ? Thanks, Daniel
1
2871
by: stillh2os | last post by:
Hello. I'm new to .NET, and I'm trying to implement a callback function. I want my managed C++ code to call an unmanaged function, passing in a callback function that the unmanaged C/C++ code...
3
1395
by: Yannick Turgeon | last post by:
Hello all, I'm using A97 and I'd like to keep about 30 informations concerning the logged in user, in order to prevent hundreds of DB access per user to get these informations (mainly rights +...
1
2792
by: eBob.com | last post by:
I have some code which is trying to determine where text will wrap in a custom text box (which Inherits from Control). It determines the number of characters which will fit in the first line, but...
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7386
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
7543
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
7534
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...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.