about Settings.settings

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Hi guys, i have a question about Settings.settings

I have some datasets in my app, each dataset uses a connection (myCnn)
created in Settings.settings

if i use
Properties.Settings.Default.myCnn="otherStringConnection";

i got

Error 3 Property or indexer 'Usuarios.Properties.Settings.myCnn cannot be
assigned to -- it is read only F:\Treb\Usuarios\Usuarios\Form1.cs 96 13
Usuarios

its only read, how can i modify it? i want to load my string connection from
a text file and use it in all my app datasets

Regards.
 
Hi Rick,

Try setting the property through the indexer:

Properties.Settings.Default["myCnn"] = "otherStringConnection";
 
Back
Top