|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Assign Property Values via String Variables?Using VB.NET 2005.
I will not go into detail on a problem I can't figure out, but I will describe it simple terms that should convey the underlying issue. I have a class called ClassA. It has two properties, Property1 and Property2. Both properties are string datatypes. This class is a member of a class library. I have some code in an application that imports the class library that ClassA is a member of. In this code I have DIMmed a variable called myClassA that is a New ClassA datatype. I have a string array of two elements who values are "Property1" and "Property2". I would like to assign values to the two properties utilizing the myClassA instance but referring to the properties by means of the values of the string array. Is that possible? TIA, In article <amjsu1p63h8jqfcf76chogkragpphm2***@4ax.com>,
joec***@home.net says... Show quoteHide quote > Using VB.NET 2005. Yes. Use Reflection. See:> > I will not go into detail on a problem I can't figure out, but I will > describe it simple terms that should convey the underlying issue. > > I have a class called ClassA. It has two properties, Property1 and > Property2. Both properties are string datatypes. This class is a > member of a class library. > > I have some code in an application that imports the class library that > ClassA is a member of. In this code I have DIMmed a variable called > myClassA that is a New ClassA datatype. I have a string array of two > elements who values are "Property1" and "Property2". I would like to > assign values to the two properties utilizing the myClassA instance > but referring to the properties by means of the values of the string > array. Is that possible? http://tinyurl.com/n0cp
Several TexBox in a form of an array
DateDiff function returning incorrect results in asp.net 2.0 vb Time conversion and vb.net Find specific pattern in a string SImple ADO.Net problem vb 2005 email ProgressBar Question DATATYPE PROBLEM(cross) .net 2005 cannot show menu ! Convert a String to a VB statement ? |
|||||||||||||||||||||||