I am using contactsreader.dll to import my Gmail contacts. One of my method has the out parameter. I am doing this:
Gmail gm = new Gmail();
DataTable dt = new DataTable();
string strerr;
gm.GetContacts("chendur.pandiya@gmail.com", "******", true, dt, strerr);
// It gives invalid arguments error..
And my Gmail class has
public void GetContacts(string strUserName, string strPassword,out bool boolIsOK,
out DataTable dtContatct, out string strError);
Am I passing the correct values for out parameters?
You need to pass them as declared variables, with the
outkeyword:In other words, you don’t pass values to these parameters, they receive them on the way
out. One way only.