如果上传控件是File而不是FileUpload。如下函数要怎么改?private bool IsAllowedExtension(FileUpload hifile)
    {
        System.IO.FileStream fs = new System.IO.FileStream(hifile.PostedFile.FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
        System.IO.BinaryReader r = new System.IO.BinaryReader(fs);
        string fileclass = "";
        byte buffer;
        try
        {
            buffer = r.ReadByte();
            fileclass = buffer.ToString();
            buffer = r.ReadByte();
            fileclass += buffer.ToString();        }
        catch
        {        }
        r.Close();
        fs.Close();
        if (fileclass == "255216" || fileclass == "7173")//        {
            return true;
        }
        else
        {
            return false;
        }
    }
private bool IsAllowedExtension(File hifile)改成这样就会提示錯誤 11 'System.IO.File': 靜態型別不能當做參數使用 D:\B2C\manage\phoneadd.aspx.cs 87 18 D:\B2C\