Click here to Skip to main content
16,022,971 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all !!!
I have a table A (Name,IsDisplayed)
I have a grid B, it gets data from table A with textbox and checkbox. User can update checkbox and save to table A.
Now my requirement wants to use enum to manage table A.
i plans create enum contains 2 values (name,isdisplayed).
But i know i can not update values isdisplayed at runtime.
How can i do ???

I think i will create enum contain id,name and xml file contain id,isdiplayed.
when i update isdiplayed checkbox, i will update value in xml.
Is it ok ???
Posted
Comments
Karthik_Mahalingam 9-Dec-13 4:50am    
Enum is a named constants, why you want to make it complicated...
can you explain ?

Add some code block..

As you want to manage a Table, so better to use a DataTable.
You can use Class and Properties.

But Enum is not a good choice. Enum is used for Constant values.
 
Share this answer
 
Do I get your question correctly?

you have a enum
C#
public enum ManageTable
{
  name,
  displayed
}


you want to be able to adjust an element of it? i.e. change name to TableName.

Afraid to say you can't. I would have a read of these
Dynamically change the Value of enum in C#?[^]
Enum reference[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900