开发者

Using Model with none MVC application

I'm trying to use a Model with my Asp.net page. But im not using MVC. I get an error when trying to inherit the model from a customcontrol. The error is

ViewModel: interface开发者_如何学Python name expected.

public partial class CustomControl : UserControl, ViewModel


You cant do multiple inheritance in C#. UserControl and ViewModel are both classes and you are only able to inherit from a single class.

You can however implement as many interfaces as you like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜