wenyonk
asked on
No overload for 'HasAccess' matches delegate 'System.EventHandler'
Can someone please help with this line of code conversion from VB to C#? Below is the original code, my attempt, and the compile errors.
VB
copiedData.Add(New TestDataSource(dataSource. DataSource .CopyAll(A ddressOf Security.HasAccess, recordType, locationID, accessType)))
C#
copiedData.Add(new TestDataSource(dataSource. DataSource .CopyAll(n ew System.EventHandler(Securi ty.HasAcce ss, recordType, locationID, accessType))));
Errors:
No overload for 'HasAccess' matches delegate 'System.EventHandler'
The best overloaded method match for 'App.ICAEditable.CopyAll(A pp.UsersAn dSecurity. CheckPermi ssion, App.RecordTypeEnum, int, App.AccessTypeEnum)' has some invalid arguments
Argument '1': cannot convert from 'System.EventHandler' to 'App.UsersAndSecurity.Chec kPermissio n'
VB
copiedData.Add(New TestDataSource(dataSource.
C#
copiedData.Add(new TestDataSource(dataSource.
Errors:
No overload for 'HasAccess' matches delegate 'System.EventHandler'
The best overloaded method match for 'App.ICAEditable.CopyAll(A
Argument '1': cannot convert from 'System.EventHandler' to 'App.UsersAndSecurity.Chec
System.EventHandler has the signature (object sender, System.EventArgs e)
Bob
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You know what might prove to be useful, if that was not an answer--a better description of the problem space.
Bob
Bob
ASKER
this answer seemed to compile, I'll have to do testing...
Thank you!
Thank you!
copiedData.Add(new TestDataSource(dataSource.