using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
using System.Security.Cryptography;
using System;using System.Security.Principal; //安全身份验证
using System.Text;namespace Feng.Accounts.Bus
{
/// <summary>
/// AccountsPrincipal 的摘要说明。
/// </summary>
public class AccountsPrincipal : IPrincipal
{
protected IIdentity identity;
protected ArrayList permissionList;
protected ArrayList permissionListid;
protected ArrayList roleList;
public sealed virtual IIdentity Identity
{
get
{
return identity;
} set
{
identity = value;
}
}
  }
}D:\My\Accounts\Bus\AccountsPrincipal.cs(55): 因为“Feng.Accounts.Bus.AccountsPrincipal.Identity”不是重写,所以无法将其密封
请教高人这是怎么回事啊?

解决方案 »

  1.   

    附注:
    public sealed virtual IIdentity Identity
       提示这行最后面的 Identity 出错?
      

  2.   

    原来的Identity没说是override的,你就不能sealed
      

  3.   

    还是不大明白啊,楼上的兄台:System.Security.Principal.Identity  可不可以说具体一点,小弟C#程度还不够,
      

  4.   

    sealed修饰符和virtual修饰符冲突。这两个修饰符不能一起使用。
    sealed表示密封的,不允许重写
    virtual表示虚方法,允许重写。因此根据你的需求,去掉其中一个修饰符即可。
      

  5.   

    是不是反编译工具不能正常显示才会这样的啊?  我反了一个.DLL,结果就是那样啊。郁闷ing..
      

  6.   

    插入一下因為我沒分了在學ASP.NET的時候。發現原來JavaScript不會是件很頭痛的事啊!!
    有誰能紹介一本好一點的書來學習一下。!!謝謝 ̄ ̄樓主,不好意思 ̄ ̄借用地方用一下啊 ̄ ̄ ̄不用給我分的。謝謝謝謝. ̄
      

  7.   

    在IL代码层是支持密封和虚方法在一起描述的
    但c#语法不支持
    去掉一个即可