Define Collection property problem
-
Hi any one. i want to create some class library and allow user to add it some data in a Collection.(example of it is Items property in Combobox or listbox). i define a Dictionary collection and when using , it appear in control library but when i click it to add some data it show a disabled window.:confused: its my public property:
public Dictionary<int32,> States
{
get
{
return MySexCell.States;
}
set
{
MySexCell.States = value;
}
}sepel
modified on Tuesday, October 7, 2008 2:01 PM
-
Hi any one. i want to create some class library and allow user to add it some data in a Collection.(example of it is Items property in Combobox or listbox). i define a Dictionary collection and when using , it appear in control library but when i click it to add some data it show a disabled window.:confused: its my public property:
public Dictionary<int32,> States
{
get
{
return MySexCell.States;
}
set
{
MySexCell.States = value;
}
}sepel
modified on Tuesday, October 7, 2008 2:01 PM
sepel wrote:
public Dictionary<int32,> States
Does that even compile? You need two datatypes in a
Dictionary
definition, one type for the key and one for the value. Perhaps you should use aList
instead of aDictionary
?Despite everything, the person most likely to be fooling you next is yourself.
-
sepel wrote:
public Dictionary<int32,> States
Does that even compile? You need two datatypes in a
Dictionary
definition, one type for the key and one for the value. Perhaps you should use aList
instead of aDictionary
?Despite everything, the person most likely to be fooling you next is yourself.
I'm to being DIZZY .:confused: i write dictionary (int32,string)but it dosen't appear.(using "(" instade of "<") take it easy . i try to use List. But think about this forum syntax way does not appear my code. I test another type for my second Dictionary parameter but after post it no one appear.:confused:
sepel
modified on Tuesday, October 7, 2008 1:52 PM
-
Hi any one. i want to create some class library and allow user to add it some data in a Collection.(example of it is Items property in Combobox or listbox). i define a Dictionary collection and when using , it appear in control library but when i click it to add some data it show a disabled window.:confused: its my public property:
public Dictionary<int32,> States
{
get
{
return MySexCell.States;
}
set
{
MySexCell.States = value;
}
}sepel
modified on Tuesday, October 7, 2008 2:01 PM
MySexCell? *sniggers* Just what kind of application is this? You probably don't want to expose a "set" accessor. That is if you want people to change the entire dictionary. People can "get" the dictionary and then call .Add on it. You need to google the correct attributes to put on your property to enable designer support.
Mark Churchill Director, Dunn & Churchill Pty Ltd Free Download: Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio.
Alpha release: Entanglar: Transparant multiplayer framework for .Net games. -
MySexCell? *sniggers* Just what kind of application is this? You probably don't want to expose a "set" accessor. That is if you want people to change the entire dictionary. People can "get" the dictionary and then call .Add on it. You need to google the correct attributes to put on your property to enable designer support.
Mark Churchill Director, Dunn & Churchill Pty Ltd Free Download: Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio.
Alpha release: Entanglar: Transparant multiplayer framework for .Net games.