检测 C# .NET 中 3D 文件的格式

检测格式编程示例

以下 C# 示例代码说明如何检测 3D 文件的文件格式 (使用文件路径或流) 并检查其扩展名。

// 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());