468,268 Members | 1,747 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

StringCollection property loses value

Hi all:

I have a StringCollection property like this:

public class FormExito : Form
{
................
................
private StringCollection FEditar;
[Editor("System.Windows.Forms.Design.StringCollecti onEditor,
System.Design", System.Drawing.Design.UITypeEditor, System.Drawing")]
public StringCollection Editar
{
get{ return FEditar; }
set{ FEditar = value; }
}
................
................
}

It works well in design time, but after close and open the form again the
property loses the value ...

Thanks
Juan Francisco ...
Nov 17 '05 #1
1 1920
Juan,

Where are you declaring your code that initializes this string
collection? It's possible that this is being written over when you open the
form again.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Juan Francisco Figueroa Perez" <jf**********@yahoo.com.mx> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi all:

I have a StringCollection property like this:

public class FormExito : Form
{
................
................
private StringCollection FEditar;
[Editor("System.Windows.Forms.Design.StringCollecti onEditor,
System.Design", System.Drawing.Design.UITypeEditor, System.Drawing")]
public StringCollection Editar
{
get{ return FEditar; }
set{ FEditar = value; }
}
................
................
}

It works well in design time, but after close and open the form again the
property loses the value ...

Thanks
Juan Francisco ...

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dennis Myrén | last post: by
2 posts views Thread by Dan | last post: by
8 posts views Thread by Naz | last post: by
1 post views Thread by Mike Hofer | last post: by
3 posts views Thread by Marty McFly | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.