Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cast based upon PropertyInfo

Status
Not open for further replies.

Craig0201

Technical User
Oct 11, 2000
1,261
GB
Hi all.....

I want to be able to cast using CType (or similar) to a value based upon the type returned from an instance of PropertyInfo. The name of the property is held in an array.

So in my head, this runs like...

Dim _PI As PropertyInfo = _Object.GetType().GetProperty(_RegexArray(2, j))
?CType(1, _pi.getType)()

but I can't do the _PI.GetType as this should be a type, not a method returning a type. Can anyone help?

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top