-2
SELECT Max(VarInvoiceNo) FROM  tbl_feesCollection
Rahul Tripathi
  • 161,154
  • 30
  • 262
  • 319
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
  • 41,709
  • 14
  • 73
  • 93