Detecting .NET Framework path - C#
La funzione CLRPath() (C#) restituisce il percorso del .NET Framework:
quick&dirty! :-)
using System;
using System.IO;
using System.Windows.Forms;
public class WindowsForm: System.Windows.Forms.Form
{
public static void Main()
{
Application.Run(new WindowsForm());
}
// Restituisce il percorso (path) del .NET Framework.
private string CLRPath()
{
Object CLR = new Object();
return Path.GetDirectoryName(CLR.GetType().Assembly.Location);
}
public WindowsForm()
{
MessageBox.Show(CLRPath());
}
}
Click here - Clicca qui