Ramco Ramco

Ramco Ramco

  • 441
  • 3.4k
  • 506k

Error - Syntax error [ expected

Aug 15 2024 11:27 AM

Hi

I am getting error - Syntax error [ expected

ItemList = new ItemList
[
    {
      ItemNo = 0,
      SlNo = "1",
      IsServc = "N",
      PrdDesc = "Computer Hardware - Keyboard and Mouse",
      HsnCd = "320504",
      Qty = 25,
      FreeQty = 0,
      Unit = "PCS",
      UnitPrice = 200,
      TotAmt = 5000,
      Discount = 0,
      PreTaxVal = 0,
      AssAmt = 5000,
      GstRt = 18,
      IgstAmt = 900,
      CgstAmt = 0,
      SgstAmt = 0,
      CesRt = 0,
      CesAmt = 0,
      CesNonAdvlAmt = 0,
      StateCesRt= 0,
      StateCesAmt= 0,
      StateCesNonAdvlAmt= 0,
      OthChrg= 0,
      TotItemVal = 5900
    }
]

Below is the Class

public class ItemList
{
    public int ItemNo { get; set; }
    public string SlNo { get; set; }
    public string IsServc { get; set; }
    public string PrdDesc { get; set; }
    public string HsnCd { get; set; }
    public int Qty { get; set; }
    public int FreeQty { get; set; }
    public string Unit { get; set; }
    public int UnitPrice { get; set; }
    public int TotAmt { get; set; }
    public int Discount { get; set; }
    public int PreTaxVal { get; set; }
    public int AssAmt { get; set; }
    public int GstRt { get; set; }
    public int IgstAmt { get; set; }
    public int CgstAmt { get; set; }
    public int SgstAmt { get; set; }
    public int CesRt { get; set; }
    public int CesAmt { get; set; }
    public int CesNonAdvlAmt { get; set; }
    public int StateCesRt { get; set; }
    public int StateCesAmt { get; set; }
    public int StateCesNonAdvlAmt { get; set; }
    public int OthChrg { get; set; }
    public int TotItemVal { get; set; }
}

Thanks


Answers (1)