How to Serialize object's property by its Category
-
public class Test { private int num1; private int num2; private int num3 [CategoryAttribute("BlackGround")] public int Num1 {get{return num1;} set{num1=value;}} [CategoryAttribute("BlackGround")] public int Num2 {get{return num2;} set{num2=value;}} [CategoryAttribute("ForeGround")] public int Num3 { get{return num3;} set{num3=value;} }} How get the Serialization result as below? .. .. .. ok
-
public class Test { private int num1; private int num2; private int num3 [CategoryAttribute("BlackGround")] public int Num1 {get{return num1;} set{num1=value;}} [CategoryAttribute("BlackGround")] public int Num2 {get{return num2;} set{num2=value;}} [CategoryAttribute("ForeGround")] public int Num3 { get{return num3;} set{num3=value;} }} How get the Serialization result as below? .. .. .. ok
You want to post this every two hours? Show a bit patience! If you just wanted to change your posting use the modify link instead of starting a new thread.
-
You want to post this every two hours? Show a bit patience! If you just wanted to change your posting use the modify link instead of starting a new thread.
i know ,but i didn't know why this xml tag do disappear? ok
-
i know ,but i didn't know why this xml tag do disappear? ok
Try to set the "Do not treat <'s as HTML tags" option which can be found below the text-control or use the HTML extended character codes.
-
i know ,but i didn't know why this xml tag do disappear? ok
Or escape the tags themselves using
<
for<
and>
for>
.Microsoft MVP, Visual C# My Articles
-
public class Test { private int num1; private int num2; private int num3 [CategoryAttribute("BlackGround")] public int Num1 {get{return num1;} set{num1=value;}} [CategoryAttribute("BlackGround")] public int Num2 {get{return num2;} set{num2=value;}} [CategoryAttribute("ForeGround")] public int Num3 { get{return num3;} set{num3=value;} }} How get the Serialization result as below? .. .. .. ok
i kown,bu i don't know why the xml tag became disappeared! ok