my suggestion is to create a non static class "Application" that implements IAgentProtocol
then in your Program instantiate that class, that way you will avoid all issues with the static program class and it will also make your application more portable.
staticvoidMain(string[] args){ var app = new Application();
}
-----------------
Please remember to click "Mark as Answer" the responsES that resolved your issue.
None
0 Points
8 Posts
call Ienumerable present in interface
Jun 22, 2017 06:32 PM|adityamadhira|LINK
Hi I want to known how to call Ienumerable present in interface.
Interface -
Program.cs
How to call IEnumerable<IdentityReference> IAgentProtocol.GetIdentities() in static void Main(string[] args) ?
Participant
1380 Points
608 Posts
Re: call Ienumerable present in interface
Jun 22, 2017 07:07 PM|JBetancourt|LINK
my suggestion is to create a non static class "Application" that implements IAgentProtocol
then in your Program instantiate that class, that way you will avoid all issues with the static program class and it will also make your application more portable.
Please remember to click "Mark as Answer" the responsES that resolved your issue.
None
0 Points
8 Posts
Re: call Ienumerable present in interface
Jun 22, 2017 07:14 PM|adityamadhira|LINK
No luck.
I need help to call IEnumerable<IdentityReference> IAgentProtocol.GetIdentities() in program.cs
Participant
1380 Points
608 Posts
Re: call Ienumerable present in interface
Jun 22, 2017 09:11 PM|JBetancourt|LINK
You have to cast app to IAgentProtocol, here is a working example:
Please remember to click "Mark as Answer" the responsES that resolved your issue.
Participant
1590 Points
907 Posts
Re: call Ienumerable present in interface
Jun 23, 2017 07:32 AM|PaulTheSmith|LINK
IAgentProtocol x = new Program();
x.GetIdentities();