473,408 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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 2110
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dennis Myrén | last post by:
Hi. I want to know why it is not possible to specify (or determine) the capacity for a System.Collections.Specialized.StringCollection. I guess the StringCollection would be the better choice...
2
by: Dan | last post by:
Hi, Is it possible to iterate through a StringCollection ? I have the following code but "row" always seems to contain the values of rowValues2 Thanks for any input, Danny
8
by: Naz | last post by:
Hi, I am new in C# and converting a program from delphi to C#. I have to store a list of strings in memory and also need to save the strings to disk at the end. I use StringCollection and my...
1
by: Mike Hofer | last post by:
I have a webcontrol that has the following property defined: <Category("Behavior"), PersistenceMode(PersistenceMode.Attribute),...
3
by: Marty McFly | last post by:
Hello, I have a control class that inherits from System.Web.UI.WebControls.Button. When I drag this control from the "My User Controls" tab in the toolbox onto the form, I want it to reflect the...
2
by: eSapient | last post by:
I have a case where a C# dll is being consumed by an unmanaged C++ executable. One of the dll methods returns a StringCollection object. What are the requirements for the C++ executable in terms of...
1
by: jjwhite01 | last post by:
I am working on a web form that contains a Calendar control with an image button that makes the calendar appear and disappear. However, I would like to set the visible property of the Calendar...
9
by: Johnny Jörgensen | last post by:
Hi y'all I've got a custom control that is inherited from a normal TextBox. To that, I've added a new property that I call "Units", Which is a collection class containing members of a "Unit"...
7
by: Claire | last post by:
Hi, Is there an easy/nice way to assign the contents of a stringcollection to richtextbox.lines rather than doing the following please? foreach(string str in _EmailErrors) { rtb.Text += str;...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.