Ejemplo n.º 1
0
 public string GetEmployessJSON()
 {
     UTILITY[] emps = new UTILITY[] {
     new UTILITY()
     {
         Id=101,
         Name="Nitin",
         Salary=10000
     },
     new UTILITY()
     {
         Id=102,
         Name="Dinesh",
         Salary=100000
     }
 };
     return new JavaScriptSerializer().Serialize(emps);
 }
Ejemplo n.º 2
0
 public UTILITY[] GetEmployessXML()
 {
     UTILITY[] emps = new UTILITY[] {
     new UTILITY()
     {
         Id=101,
         Name="Nitin",
         Salary=10000
     },
     new UTILITY()
     {
         Id=102,
         Name="Dinesh",
         Salary=100000
     }
 };
     return emps;
 }