Click here to Skip to main content
15,882,959 members
Home / Discussions / C#
   

C#

 
GeneralRe: object to intialize and some function call question Pin
Blubbo21-Dec-11 2:12
Blubbo21-Dec-11 2:12 
AnswerRe: object to intialize and some function call question Pin
SilimSayo20-Dec-11 15:06
SilimSayo20-Dec-11 15:06 
AnswerRe: object to intialize and some function call question Pin
BillWoodruff21-Dec-11 18:21
professionalBillWoodruff21-Dec-11 18:21 
QuestionProblem withhalo effect using .MakeTransparent and .AntiAlias in GDI+ C# Pin
jerute20-Dec-11 7:01
jerute20-Dec-11 7:01 
QuestionMarshalDirectiveException Pin
korrea8020-Dec-11 4:13
korrea8020-Dec-11 4:13 
AnswerRe: MarshalDirectiveException Pin
Richard Andrew x6420-Dec-11 6:39
professionalRichard Andrew x6420-Dec-11 6:39 
GeneralRe: MarshalDirectiveException Pin
korrea8021-Dec-11 0:48
korrea8021-Dec-11 0:48 
QuestionXML Serialization Pin
rk288120-Dec-11 2:42
rk288120-Dec-11 2:42 
Hi,
i am developing WCF application using MVC3.
I m using xmlserialization to serialize data.
Here is the sample code:

namespace A{
[serializable]
[DataContract(Name="User")]
[XmlAttribute("User")]
Public class User {

[DataMember(Name="ID"]
[XmlAttribute("ID"),IsRequired=false]
public void ID {get; set;}

[DataMember(Name="ID"]
[XmlAttribute("IDSpecified"),IsRequired=false]
public void IDSpecified{get; set;}

}
}

Now i am assigning values to this properties and trying to serialize xml.
User.ID=1;
User.IDSpecified=2;

It is giving error because property names are starting with same string "ID". If i change "Specified" instead of "IDSpecified" then it is serialize fine because property name is different.

So is there any rule that property name should not start wth same characters


Pls help me ASAP.

Thank you.

modified 20-Dec-11 8:49am.

AnswerRe: XML Serialization Pin
Subin Mavunkal20-Dec-11 4:39
Subin Mavunkal20-Dec-11 4:39 
GeneralRe: XML Serialization Pin
rk288120-Dec-11 19:35
rk288120-Dec-11 19:35 
AnswerRe: XML Serialization Pin
Eddy Vluggen20-Dec-11 6:30
professionalEddy Vluggen20-Dec-11 6:30 
AnswerRe: XML Serialization Pin
SledgeHammer0120-Dec-11 6:37
SledgeHammer0120-Dec-11 6:37 
GeneralRe: XML Serialization Pin
rk288120-Dec-11 19:54
rk288120-Dec-11 19:54 
QuestionDatagridView Adds Extra Empty Row Pin
AmbiguousName20-Dec-11 1:07
AmbiguousName20-Dec-11 1:07 
AnswerRe: DatagridView Adds Extra Empty Row Pin
PIEBALDconsult20-Dec-11 4:27
mvePIEBALDconsult20-Dec-11 4:27 
Questionapp working in window Xp but not in window 7 Pin
Hum Dum19-Dec-11 22:44
Hum Dum19-Dec-11 22:44 
AnswerRe: app working in window Xp but not in window 7 Pin
OriginalGriff19-Dec-11 23:03
mveOriginalGriff19-Dec-11 23:03 
GeneralRe: app working in window Xp but not in window 7 Pin
Hum Dum19-Dec-11 23:37
Hum Dum19-Dec-11 23:37 
AnswerRe: app working in window Xp but not in window 7 Pin
Luc Pattyn20-Dec-11 7:03
sitebuilderLuc Pattyn20-Dec-11 7:03 
GeneralRe: app working in window Xp but not in window 7 Pin
Hum Dum8-Jan-12 22:43
Hum Dum8-Jan-12 22:43 
AnswerRe: app working in window Xp but not in window 7 Pin
Luc Pattyn9-Jan-12 5:17
sitebuilderLuc Pattyn9-Jan-12 5:17 
GeneralRe: app working in window Xp but not in window 7 Pin
Hum Dum9-Jan-12 18:50
Hum Dum9-Jan-12 18:50 
QuestionData Source problem Pin
David baghaturia19-Dec-11 20:13
David baghaturia19-Dec-11 20:13 
AnswerRe: Data Source problem Pin
Jitendra Parida - Jeetu20-Dec-11 1:56
Jitendra Parida - Jeetu20-Dec-11 1:56 
GeneralRe: Data Source problem Pin
David baghaturia20-Dec-11 5:57
David baghaturia20-Dec-11 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.