开发者

Using Model with none MVC application

开发者 https://www.devze.com 2023-04-08 13:46 出处:网络
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

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

精彩评论

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