I Had Written As Below:
schoolsList.studentList.Select(x=>(x.Address.Address1).OrderByDescending(x.Address.AddressId)).Distinct().ToList());
It Is Showing
Error:
The type arguments for method
'System.Linq.Enumerable.OrderByDescending<TSource,TKey>(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TKey>)'
cannot be inferred from the usage. Try specifying the type arguments explicitly.