TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Javier Estades
NA
3
571
Adding to a string list XMLArrayItem using Get Set
Oct 20 2016 11:24 AM
Hey guys I'm having a problem with a List Get Set on C# this is what I have
Anyone Please help me see where the problem is
The problem occurs on the get trying to add the selectedvalue
I'm thinking I wrote the get set wrong but I don't see it. I'm not used get sets with lists.
[Serializable]
public class ProcessObjectParts
{
/// <summary>
/// Object Part Lists
/// </summary>
[XmlArrayItem("Parts")]
public List<string> Parts { get; set; }
}
and the Get set goes like this:
get {
ProcessObjectParts parts = new ProcessObjectParts();
parts.Parts.Add(DropDownControl.SelectedValue);
parts.Parts.Add(DropDownControl.SelectedItem.Text);
return parts;
}
set {
var parts = GlobalHelper.DeserializeData<ProcessObjectParts>(value.ToString());
DropDownControl.SelectedValue = parts.Parts[0];
DropDownControl.SelectedItem.Text = parts.Parts[1];
ViewState[parts.Parts[0]] = value;
}
Reply
Answers (
1
)
Search box of ms-word...How to ???
How to merge one DataTable to another DataTable in c#?