V
V
Vladimir2020-07-19 16:04:45
.NET
Vladimir, 2020-07-19 16:04:45

The compiler throws an error, what's wrong?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace SimpleCSharpApp
{
    class Program
    {

        static void ShowEnvironmentDetails()
        {
            // Вывести информацию о дисковых устройствах
            // данной машины и другие интересные детали,
            foreach (string drive in Environment.GetLogicalDrives())
                Console.WriteLine("Drive: {0}", drive); // Логические устройства
            Console.WriteLine("OS: {0}", Environment.OSVersion); // Версия
                                                                 // операционной системы
            Console.WriteLine("Number of processors: {0}",
            Environment.ProcessorCount); // Количество процессоров
            Console.WriteLine(".NET Version: {0}",
            Environment.Version); // Версия платформы .NET
        }
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Pavlov, 2020-07-19
@Owl_C4

Maybe rename the method to , since Main is the entry point to the application. Main(string[]arg)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question