How to use settings to store array of strings to read and edit while application is running


hello,

i have been learning c# past 2 weeks or so. trying write autocad plugin among other things, stores layer names 7 different lists.

most people have suggested using .settings files save names. having trouble working properties namespace.

the settings file have consists of 8 different settings. each array of strings. need to...

  • check individual layer names against 8 lists see if present in of them
  • if not present, ask user list should added , add it
  • use lists create selection set in autocad based on object layers. (i have ask on autodesk forum last task)

i don't how access lists. have seen people this.mycolor = properties.settings.default.someline. see properties namespace in program.

my solution layerchanger. overall namespace solution. .settings file layerlists.settings, , there layerlist1.designer.cs, , settings1.cs. 1 of lists need access called layer0.

if want set list local variable like

string[] layer0 = this.properties.settings1.layer0

any appreciated. thank you.

if trying access settings file same project, try:

layerlists.default.layer;

if trying access project, make sure you've set access modifier "public" instead of "internal" @ top of designer in vs. add namespace in front of type or add using statement:

applicationnamespace.layerlists.default.layer; 



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user