Información del sistema Ejercicio C# - Curso de Programación C# (C Sharp)

 Ejercicio

Información del sistema

 Objetivo

Cree un programa que muestre ciertos detalles del sistema: nombre de equipo, nombre de dominio y nombre de usuario registrados en el sistema.

 Código de Ejemplo

// Import necessary namespaces for working with system information
using System;

class SystemInformation
{
    // Main method where the program execution starts
    static void Main()
    {
        // Display the name of the computer
        Console.WriteLine("Computer Name: " + Environment.MachineName);

        // Display the domain name (or "Workgroup" if not part of a domain)
        Console.WriteLine("Domain Name: " + Environment.UserDomainName);

        // Display the username of the currently logged-in user
        Console.WriteLine("User Name: " + Environment.UserName);
    }
}

Más ejercicios C# Sharp de Bibliotecas Adicionales


Juan A. Ripoll - Tutoriales y Cursos de Programacion© 2025 Todos los derechos reservados.  Condiciones legales.