예제 #1
0
        static void DisplayVBCompilerInfo()
        {
            // Get the provider for Microsoft.VisualBasic
            CodeDomProvider provider = CodeDomProvider.CreateProvider("VisualBasic");

            // Display the Visual Basic language provider information.
            Console.WriteLine("Visual Basic provider is {0}",
                              provider.ToString());
            Console.WriteLine("  Provider hash code:     {0}",
                              provider.GetHashCode().ToString());
            Console.WriteLine("  Default file extension: {0}",
                              provider.FileExtension);

            Console.WriteLine();
        }
예제 #2
0
        static void DisplayCSharpCompilerInfo()
        {
            // <Snippet2>
            // Get the provider for Microsoft.CSharp
            CodeDomProvider provider = CodeDomProvider.CreateProvider("CSharp");

            // Display the C# language provider information.
            Console.WriteLine("CSharp provider is {0}",
                              provider.ToString());
            Console.WriteLine("  Provider hash code:     {0}",
                              provider.GetHashCode().ToString());
            Console.WriteLine("  Default file extension: {0}",
                              provider.FileExtension);

            // </Snippet2>
            Console.WriteLine();
        }
예제 #3
0
        static void DisplayVBCompilerInfo()
        {
            Dictionary <string, string> provOptions =
                new Dictionary <string, string>();

            provOptions.Add("CompilerVersion", "v3.5");
            // Get the provider for Microsoft.VisualBasic
            CodeDomProvider provider = CodeDomProvider.CreateProvider("VisualBasic", provOptions);

            // Display the Visual Basic language provider information.
            Console.WriteLine("Visual Basic provider is {0}",
                              provider.ToString());
            Console.WriteLine("  Provider hash code:     {0}",
                              provider.GetHashCode().ToString());
            Console.WriteLine("  Default file extension: {0}",
                              provider.FileExtension);

            Console.WriteLine();
        }