Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referring to an object by its name
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Referring to an object by its name
Miscellaneous
Thread ID:
00966331
Message ID:
00966331
Views:
47
In this code:
class TestClass
{
  private string _myString = "hello";

  public TestClass()
  {
      this.ChangeString( "_myString", "SomeNewValue" );
  }
  public void ChangeString( string fldname, string newValue )
  {
      // refer to the field fldname and change it's value to newValue
      ??????
  }
}
How can i refer to the myString field and change it's value from it's name ?
Next
Reply
Map
View

Click here to load this message in the networking platform