Is there any way to create a local variable in a function, calculate it and return that function in same line,
For Example making this function
public static List<string> CalculateScore(this IEnumerable<GatheredMissionScore> list)
{
var calculatedScore = list.Select(gatheredScore => gatheredScore.ToString()).ToList();
return calculatedScore;
}
Like This
public static List<string> CalculateScore(this IEnumerable<GatheredMissionScore> list)
{
return var calculatedScore = list.Select(gatheredScore => gatheredScore.ToString()).ToList();
}