"The argument types that are passed to the function do not match the parameter types of that function. If the called function is overloaded, none of the overloaded versions has a signature that matches the argument types that are passed."
In other words...either your EPDMSerialNumberNames is not the correct type / can't be converted to match any of the argument type in all overloads...or you're missing aruguments / none of the overloads supports this number of arguments.
Read more here...
Hope this helps,
I found that information before. But from what I had in VB, this should be right. My variable, EPDMSerialNumbersNames is defined as an Array... and since GetSerialNumberNames is wanting an array to populate, that "should" be right.
I've tried several different ways to define that array, and nothing seems to work. This is what I have now:
public Array EPDMSerialNumberNames;
Is there a different way to define that so it would work????
C# is more strict than VB so you have to spell things out so to speak. VB will implicitly cast objects to the required type. In C# use the "as" keyword to define the object type to be returned. Also, if C# expects a function to pass the value of a parameter you have to use the "out" keyword. So here's the two lines in question updated as required.
EPDMSerialNumbersAvailable = VaultHook.CreateUtility(EdmUtility.EdmUtil_SerNoGen) as IEdmSerNoGen7;
EPDM 2011 SP2
That did it. Thank you so much. And thank you for explaining that one better for me!!
Looks like I'm running into the same issue again... and the same advice isn't working for it...
public EdmLib.IEdmSerNoValue GeneratedSerialNumber;
GeneratedSerialNumber = SerialNumbersAvailable.AllocSerNoValue( listBoxEquipmentFamiliy.SelectedItem.ToString, handle, "0", "0", "0", "0", "0" ) as EdmLib.IEdmSerNoValue;
I'm liking C# so far... it's just these little things like this that I'm having issues with coming from a VB world.
ToString() is a method.
Also, AllocSerNoValue() requires parameters of type int/long where you have strings. "0" should be 0.
Wow... so simple...
Thanks Lee... that took care of it. Guess I'm still having trouble with C# not automatically putting () on the methods for me like VB does.