QQ聊天

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

 

posted @ 2018-04-17 10:47  SITT  阅读(617)  评论(0编辑  收藏  举报
QQ聊天