I am getting the Error "The type or namespace name 'var' could not be found are you missing a using directive or an assembly reference?)" And yes, I did make sure it's all lowercase. Also, I am using .Net framework 4.5.1 I know var didn't work before 3.0. Below is part of my code that has no errors or trouble compiling if i take out the var statement.
using GalaSoft.MvvmLight;
using System;
using VKCatalyst.Model;
namespace VKCatalyst.ViewModel
{
public class MainViewModel : ViewModelBase
{
private readonly IDataService _dataService;
var i = 10;
}
}
While I see that this has been addressed in the past (I thought it might) I thought it might be a good idea to leave up as many new programmers like myself, may not realize that the reason they 'var' isn't being found is that it is not in a method.