Implement Custom MembershipUser and Custom MembershipProvider

烈酒焚心 提交于 2019-12-04 17:21:47

Change the return type of CreateUser and GetUser to the base class MembershipUser. When you call these methods you can then cast it to the type iTwitterMembershipUser. For example in CreateUser you change the return statement to

return (iTwitterMembershipUser) GetUser(login);

It's been a long time since I looked at the MembershipProvider stuff, and I don't remember all of the interfaces. But your error is in regards to the fact that you are implementing an abstract base class, that has abstract methods that you are not implementing. If you implement an interface, or inherit from a class with abstract methods, then your class must provide implementations of those members. In your case, your return type does not match the return type of the abstract method.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!