我有2个DirectoryInfo对象,并想检查它们是否指向同一目录.除了比较他们的全名,还有其他更好的方法吗?请忽略链接的情况.
这就是我所拥有的.
DirectoryInfo di1 = new DirectoryInfo(@"c:\temp");
DirectoryInfo di2 = new DirectoryInfo(@"C:\TEMP");
if (di1.FullName.ToUpperInvariant() == di2.FullName.ToUpperInvariant())
{ // they are the same
...
}
Run Code Online (Sandbox Code Playgroud)
谢谢.
您知道.NET 4.0 DLR支持的动态语言列表吗?
我知道IronRuby,IronPython是受支持的.不确定IronScheme是否.F#?还有什么?
谢谢!
我想做这样的事情
void DoSomething<T>(T param)
{
if param is IEnumerable<?>
{
loop param and do stuff
}
}
Run Code Online (Sandbox Code Playgroud)
我不知道在问号的位置做什么.它有可能吗?