I'm trying to learn, and have run into a little difficulty.
Trying to add a class to my program, passing a structure as the parameter to the class, and get "The best overload method match...has some invalid arguments" error message - and I just plain don't understand it!
// in program's MainWindow code:
struct InData
{
public DateTime cDate;
public string cName;
}
//---
int ptr = 0;
List<InData> CmtList = new List<InData>;
InData prmList = new InData();
//---
// program code populates CmtList
//---
// when btnPrint is clicked
prmList = CmtList[ptr];
using (clsPrint cp = new clsPrint)
{ cp.PrintComments(prmList); }
// in clsPrint code:
struct cmData
{
public DateTime cDate;
public string cName;
}
//---
public void PrintComments(cmData prmData)
{ ... }
I'd really appreciate it if someone could point me in the direction of what I'm doing wrong here.