Определение формата файла 3D в C# .NET
Contents
[
Hide
]
Используя Aspose.3D for .NET API, разработчики могут определить формат поддерживаемых файлов 3D в C# перед его открытием, поскольку расширение файла не гарантирует, что содержимое файла подходит.
Обнаружить образец программирования формата
Следующий пример C# показывает, как определить формат файла 3D (используя путь к файлу или поток) и проверить его расширение.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET | |
// Detect the format of a 3D file | |
FileFormat inputFormat = FileFormat.Detect("document.fbx"); | |
// Display the file format | |
Console.WriteLine("File Format: " + inputFormat.ToString()); |