-2
SELECT Max(VarInvoiceNo) FROM  tbl_feesCollection
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
LEO221
  • 3
  • 4
  • 1
    Possible duplicate of [Using Linq to SQL, how do I find min and max of a column in a table?](http://stackoverflow.com/questions/2268175/using-linq-to-sql-how-do-i-find-min-and-max-of-a-column-in-a-table) – Devraj Gadhavi May 18 '16 at 07:07

1 Answers1

2

Use the Max() method:

var result = db.tbl_feesCollection.Max(element => element.VarInvoiceNo);
René Vogt
  • 43,056
  • 14
  • 77
  • 99