MaxScript调用DotNet时命名空间的问题

Fn GetSpecialFolder argEnumName = (DotNetClass "System.Environment").GetFolderPath (Execute ("(DotnetClass  \"Environment+SpecialFolder\")." + argEnumName))
Fn GetSpecialFolderArgs = GetPropNames (DotnetClass  "Environment+SpecialFolder")

GetSpecialFolder #desktop
GetSpecialFolder #ApplicationData
using System;

namespace TestDotNet
{
    class Program
    {
        public static void Main(string[] args)
        {
            Environment.SpecialFolder specialFolder = Environment.SpecialFolder.Desktop;
            Console.WriteLine(specialFolder.GetType());
            Console.ReadKey();
        }
    }
}

猜你喜欢

转载自www.cnblogs.com/sitt/p/8862399.html
今日推荐