Util类运行时出现错误;
public class Util
{
public static string Encrypt(string InnerCode)
{
return InnerCode; byte[] bt= new Byte[InnerCode.Length]; for(int i=0;i<InnerCode.Length;i++)
{
bt[i]=(byte)InnerCode[i];
} HashAlgorithm thm=MD5.Create();
byte[] btResult=thm.ComputeHash(bt);
return System.Convert.ToBase64String(btResult);
}
}错误出现在byte
byte[] bt= new Byte[InnerCode.Length];
具体错误为:Unreachable code detected
请大家帮忙解决
public class Util
{
public static string Encrypt(string InnerCode)
{
return InnerCode; byte[] bt= new Byte[InnerCode.Length]; for(int i=0;i<InnerCode.Length;i++)
{
bt[i]=(byte)InnerCode[i];
} HashAlgorithm thm=MD5.Create();
byte[] btResult=thm.ComputeHash(bt);
return System.Convert.ToBase64String(btResult);
}
}错误出现在byte
byte[] bt= new Byte[InnerCode.Length];
具体错误为:Unreachable code detected
请大家帮忙解决
public class Util
{
public static string Encrypt(string InnerCode)
{
return InnerCode;
/*
byte[] bt= new Byte[InnerCode.Length]; for(int i=0;i<InnerCode.Length;i++)
{
bt[i]=(byte)InnerCode[i];
} HashAlgorithm thm=MD5.Create();
byte[] btResult=thm.ComputeHash(bt);
return System.Convert.ToBase64String(btResult);
*/
}
}