System information VB.Net Exercise - Visual Basic Programming Course


System information


Create a program that shows specific system details, including the computer name, domain name, and the username of the user who is currently logged in.


Imports System

Class SystemInformation
    Private Shared Sub Main(ByVal args As String())
        Dim machineName As String = Environment.MachineName
        Dim domainName As String = Environment.UserDomainName
        Dim userName As String = Environment.UserName
        Console.WriteLine("Machine name: {0}", machineName)
        Console.WriteLine("Domain name: {0}", domainName)
        Console.WriteLine("User name: {0}", userName)
    End Sub
End Class

Juan A. Ripoll - Systems Tutorials and Programming Courses © 2024 All rights reserved.  Legal Conditions.