This article basically telling you do not use VS 2012 without Update 4.
I declared an Interface as below.
public interface ICommanIneterface<T>
MySqlDataAdapter Insert(T source, MySqlConnection connetion);
I am an implementation of the Interface.
public class UserCommand : ICommanIneterface<user>
public MySqlDataAdapter Insert(user User1, MySqlConnection connection)
I then create a Template class.
public class CommonCommand<T>
public void InserCommand(T t, ICommanIneterface<T> func)
I consumed the Template class with the follow code.
CommonCommand<user> commonCommand = new CommonCommand<user>();
user t = new user();
t = PopulateObject(); consume the
For god sake, I have gotten an
Error 1 ‘SunMoonCS.Data_Access.CommonCommand<SunMoonCS.Maintenance.user>’ does not contain a definition for ‘UpdateCommand’ and no extension method ‘UpdateCommand’ accepting a first argument of type ‘SunMoonCS.Data_Access.CommonCommand<SunMoonCS.Maintenance.user>’ could be found (are you missing a using directive or an assembly reference?)
What I did was I temporary removed the second parameter.
public void InserCommand(T t,)
Retype the following
CommonCommand<int> commonCommand = new CommonCommand<int>();
By doing that I managed to compile. After that I changed back all the code to what it was before and build again without error.
This is Visual Studio 2012 bug. I installed Update 4 and the problem seems no longer there.