Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 528.5k

Declare variable globally

Apr 9 2023 4:59 PM

Hi

  I want to declare var Result once only. How it can be declared

var Result = (from t2 in context.View_GroupParticipants
                                  select new { t2.StudentID, Name = t2.Name + " - " + t2.MobileNo }).OrderBy(x => x.Name).Distinct().ToList();

Thanks


Answers (5)