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

Determine if field or nested type?

GBR
Hi Guys,

I have been boggling over this for the past few days. I have a class like
this:

Class A
Property Name as String
Property ID as Integer
Property Address as B
End Class

Class B
Property Street as string
Property State as string
End Class

I am sending the Class A through web services onto the client through a
collection. Everything is working fine except ofcourse, the properties are
translated as Public Fields by the web server proxy class. I read on MSDN how
to write a wrapper using CodeDOM that will translate the fields back to
Properties. This works fine in cases where the class being sent does not
contain any nested types. To handle nested types, I need to some way find out
whether the field or member I am looking at is actually a field or nested
type.

At first, I thought I could use IsClass but turns out, for fields of type
String, the IsClass is set to True also.

So, the question is, IS THERE ANY WAY I CAN DETERMINE IF THE MEMBER I AM
LOOKING AT THRU REFLECTION IS ACTUALLY A FIELD OR A NESTED TYPE?

Thanks a lot....
Nov 23 '05 #1
0 950

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

Similar topics

3
by: Shahid Juma | last post by:
Hello All, This may be a trivial question, but I was wondering how can you determine if a value contains an Integer or Float. I know there is a function called IsNumeric, however you can't...
7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
3
by: Tor Erik Sønvisen | last post by:
Hi How can I determine the type of a socket (TCP or UDP) object? regards tores
0
by: swtrse | last post by:
Hi, There is a big problem using an XSD-Schema in C# to generate an XML-File (with WriteXML). The Scheme is defined as ------------------------------------------------------------ <?xml...
4
by: Dennis C. Drumm | last post by:
Is there a way with C# to allow one class access to a method or field of another class, without making that method or field visible to all other classes, as would be the case when making the method...
6
by: B0nj | last post by:
I've got a class in which I want to implement a property that operates like an indexer, for the various colors associated with the class. For instance, I want to be able to do 'set' operations...
12
by: Sadeq | last post by:
Is there a way to read a struct field by field? I want to write a rather general function, like: public string EncodeStruct (struct strct) { .... } which accepts a general struct type,...
1
by: mark_aok | last post by:
Hi all, I have a situation where I need to determine a specific table's primary key, and then output it. I have tried the Database Object, and the Record Object, but I've had no luck. ...
3
by: burtoncn | last post by:
Hi, Just a little background information on the project I am working on! I am responsible for creating a database to automatically generate travel claims for conference attendees (Approx. 300)...
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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.