473,395 Members | 1,996 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.

Verify fields of a class

Dear All,
I have a class

Public class ClassA
Public Age as integer = 0
Public Name as String = ""
Public Salary as integer = 0
End class

I create the Object of this class
Dim oBj as new ClassA

I have a function that takes some parameters one being the field name

Function FillDetails ( byval ..., byref fieldname as Object,...)

When the application programmer calls this function
FillDetails(...,oBj.Age,...)

My function wants to compare if the pass field exists in the class
Object defined in the function

Dim fldList() As System.Reflection.FieldInfo =
myObj.GetType.GetFields()
Count =0
While Count < _fldList.Length - 1
If Field Is _fldList(Count).GetValue(myObj) Then
strField = _fldList(Count).Name
Exit While
Else
'do nothing
End If
Count = Count + 1
End While

This function works well if pass a class having fields that are
userdefined...but for a simple class like mentioned above it fails...

Could someone please help?

TALIA
Many Regards
Sunil
Nov 22 '05 #1
0 977

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

Similar topics

0
by: Sunil Menon | last post by:
Dear All, I have a class Public class ClassA Public Age as integer = 0 Public Name as String = "" Public Salary as integer = 0 End class I create the Object of this class
0
by: Support | last post by:
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head>...
0
by: Wells Fargo | last post by:
<html dir=3D"ltr"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dwindows= -1252"> <title>New Page 1</title> </head> <body>
0
by: Sunil Menon | last post by:
Dear All, I have a class Public class ClassA { Public int Age = 0; Public string Name = ""; Public int Salary= 0; } I create the Object of this class
2
by: Wayne Wengert | last post by:
I want to write a Windows application to go through all the email addresses in an SQL Server table and to report which ones are invalid. From Googling and perusing NGs it is my understanding that...
0
by: service | last post by:
This is a multi-part message in MIME format --siNt1NhCoyB3mEPydjXJyOTcg=_X6kQe0H0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable - This mail is a HTML mail. Not all...
0
by: CHC | last post by:
Hi, I would like to verify the authenticity of a X509 digital certificate. I'm using Crypt::X509 to create a certificate object and can extract the data fields. But, I can't find a way to verify...
43
by: Xancatal | last post by:
Hey everybody. I need help on this one. I need to verify that a number entered by a user is not either a negative number (-100.00), or an alphabet (a, b, c, X, Y) as well as other number other than...
3
by: jpr | last post by:
Hello, I have a form on which I have a cmdbutton to copy a couple of fields into another table (MASTER) using the SSN on the active form as criteria. In the active form (based on a tables...
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
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: 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:
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.