dynamically add a string consant to a class

Posted by Saratvaddilli under C# on 6/20/2013 | Points: 10 | Views : 841 | Status : [Member] [MVP] | Replies : 1
Hi ,
I want to add "Public string constant somevalue ="somevalue"" dynamically

Thanks and Regards
Show difficulties that how difficult you are


Posted by: Allemahesh on: 6/20/2013 [Member] [MVP] Silver | Points: 25

As per knowledge, it is not possible. You can use the readonly datatype for this.
When ever you need to add this constant values, you call the class to assign vales to readonly using constructor.

Hope this will help you.

Saratvaddilli, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response