Atul Patil

Atul Patil

  • NA
  • 586
  • 73.8k

how to remove array bracket?

Dec 5 2016 9:41 AM
How remove square brackets 
[
   { 	
      "CaseDate":"String content", 	
      "CnclAmount":"String content", 	
      "DeptName":"String content", 	
      "DiscAmount":"String content", 	
      "ToAmount":"String content", 	
      "ToNo":2147483647 
   }
]
Here is my code
public List<Diagnosys> GetAllSummary()       
 {           
    DataClasses1DataContext db = new DataClasses1DataContext();           
    List<Diagnosys> slist = new List<Diagnosys>();       
     string msg = "";           
 var query = db.diagnosis_summary();         
   foreach (var s in query)           
 {               
 slist.Add(new Diagnosys()               
 {                   
    CaseDate = Convert.ToDateTime(s.CaseDt).ToString(),         
    DeptName = s.DeptNm,                    
   ToNo = Convert.ToInt16(s.ToNo),                   
    ToAmount = Convert.ToString(s.ToAmount),                   
    CnclAmount = Convert.ToString(s.CnclAmt),                   
    DiscAmount = Convert.ToString(s.DiscAmount)                
});            
  }            
return  slist;                 
 }


Answers (2)