473,625 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert myObject.Parame ter to string "myObject.Param eter"

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.Parame ter)

str should equal "myObject.Param eter"

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

Thanks

Nov 24 '06 #1
2 1452
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.Parame ter)

Nstr should equal "myObject.Param eter"

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

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.GetComp any(6) ' 6 is the Id of the
company

Dim str as String = ReturnClassAndP ropertyAsString (A.Name)

str should be equal to "Company.Na me".

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
3059
by: Mysooru | last post by:
Hi All, One of the ATL class..... template <class Base> class CComObject : public Base { public: typedef Base _BaseClass;
3
2025
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
2746
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 ElementID="1"></Element> <Element ElementID="2"></Element> <Element ElementID="3"></Element> </Elements>
9
3512
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
8980
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 ************************************************************************* Error : type specifier omitted for parameter string.h line 30 ************************************************************************ The following is the line where I get this error: Line 30 : # if (_STLP_OUTERMOST_HEADER_ID == 0x269) Line 31...
5
3031
by: Brahm | last post by:
hi folks ! What is the equivalent parameter in vb 2005 for "any" from vb 6 ? Thanks, Daniel
1
2890
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 will call. I'm getting Error 2664: cannot convert parameter 1 from CallBack __gc * to CUSTOM_HOOK_CALLBACK_FUNCTION. Here's what I have... In my unmanaged DLL -- Header file: --------------------------------------------------- typedef VOID...
3
1400
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 + email, name, login, ...). So I would like to load and keep these informations only once. I know I could create an hidden form holding these values but is there another way? I'd like to create a user-defined Type or a Classe module but I can't...
1
2799
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 then encounters an exception when it calls MeasureCharacterRanges to see if the next character, i.e. the one destined to become the first character of the second line, will fit. The message says only "Invalid parameter" - it does not say which...
0
8251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8635
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8494
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6115
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2614
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 we have to send another system
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.