Creating an instance of a interface in c# -


i using interface in c# , rather write entirely new class implements interface possible create object implements interface? interface defined as

public interface itokenstore {      itoken createrequesttoken(ioauthcontext context);       itoken createaccesstoken(ioauthcontext context); } 

and know in java like

itokenstore tokenstore = new itokenstore()     {         itoken createrequesttoken(ioauthcontext context) {             itoken requesttoken = null;              return requesttoken;         }          itoken createaccesstoken(ioauthtoken context) {             itoken accesstoken = null;              return accesstoken;         }     }; 

is there equivalent way instantiate in instance of interface in c#?

the way "create instance of interface in c#" create instance of type implementing interface.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -