Class UnsupportedFileFormatException
이름 공간 : Aspose.Note 모임: Aspose.Note.dll (25.4.0)
문서 로드 중에, 파일 형식이 Aspose.Note에 의해 인식되지 않거나 지원되지 않은 경우.
public class UnsupportedFileFormatException : Exception, ISerializable
Inheritance
object ← Exception ← UnsupportedFileFormatException
Implements
상속 회원들
Exception.GetBaseException() , Exception.ToString() , Exception.GetType() , Exception.TargetSite , Exception.Message , Exception.Data , Exception.InnerException , Exception.HelpLink , Exception.Source , Exception.HResult , Exception.StackTrace , Exception.SerializeObjectState , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
OneNote 2007 형식이 지원되지 않기 때문에 문서 로드가 실패하는지 확인하는 방법을 보여줍니다.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "OneNote2007.one");
try
{
new Document(fileName);
}
catch (UnsupportedFileFormatException e)
{
if (e.FileFormat == FileFormat.OneNote2007)
{
Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
}
else
throw;
}
Constructors
UnsupportedFileFormatException(스트리밍 정보, 스트리밍 컨텍스트)
Aspose.Note.UnsupportedFileFormatException 클래스의 새로운 예를 시작합니다.
protected UnsupportedFileFormatException(SerializationInfo serializationInfo, StreamingContext synchronizationContext)
Parameters
serializationInfo
SerializationInfo
시리얼 정보에 대한 정보
synchronizationContext
StreamingContext
Synchronization 컨텍스트
Properties
FileFormat
데이터가 발견되면 전송된 데이터의 파일 형식을 얻습니다.
public FileFormat FileFormat { get; }
부동산 가치
Examples
OneNote 2007 형식이 지원되지 않기 때문에 문서 로드가 실패하는지 확인하는 방법을 보여줍니다.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "OneNote2007.one");
try
{
new Document(fileName);
}
catch (UnsupportedFileFormatException e)
{
if (e.FileFormat == FileFormat.OneNote2007)
{
Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
}
else
throw;
}