0

嗨,我在我的应用程序中收到以下错误

System.NullReferenceException.Object 引用未设置到代码上的对象实例。我不明白为什么它会抛出这个特殊的异常。

   Dim namePosition As Int16
    Dim stream As IO.Stream

    stream = File1.PostedFile.InputStream
    Dim uploadedFile(stream.Length) As Byte

    stream.Read(uploadedFile, 0, stream.Length)

    namePosition = File1.PostedFile.FileName.LastIndexOf("\") + 1
    fileName = File1.PostedFile.FileName.Substring(namePosition)
    fileType = File1.PostedFile.ContentType
4

0 回答 0