Skip to content

By leveraging various system management libraries and APIs, this application can gather details about the operating system, processor, memory, disk drives, and network adapters.

Notifications You must be signed in to change notification settings

fastuptime/Learning_System_Information_with_C_Sharp

Repository files navigation

Learning System Information with C#

image

🚀 Welcome to Learning System Information with C#! 🚀

This project demonstrates how to retrieve and display system information using C#. By leveraging various system management libraries and APIs, this application can gather details about the operating system, processor, memory, disk drives, and network adapters.

📋 Table of Contents

✨ Features

  • Operating System Information: Retrieve details such as OS name, version, and manufacturer.
  • Processor Information: Get the processor name, manufacturer, and description.
  • Memory Information: Display memory capacity and speed.
  • Disk Drive Information: Show disk model, interface type, and media type.
  • Network Adapter Information: List all network adapters with their name, description, status, and speed.

🛠️ Installation

  1. Clone the Repository:

    git clone https://github.com/fastuptime/Learning_System_Information_with_C_Sharp.git
  2. Open the Project:

    • Open the solution file (.sln) in Visual Studio.
  3. Restore NuGet Packages:

    • Ensure you have the System.Management package installed via the NuGet Package Manager.
    • To install manually, use:
      Install-Package System.Management
  4. Build and Run:

    • Build the solution and run the application.

🎮 Usage

  1. Start the Application:

    • Run the application from Visual Studio.
  2. Get System Information:

    • Click the Get System Information button.
    • The system information will be displayed in the rich text box.

image

📝 Code Overview

The core functionality is encapsulated in the Form1 class:

  • Event Handling: The button1_Click method handles the button click event to initiate the system information retrieval.
  • Information Retrieval: The ListSystemInfo method compiles system information using the GetManagementObject helper method.
  • Management Objects: The GetManagementObject method uses WMI (Windows Management Instrumentation) to query system properties.

Example of Retrieving Processor Information

sb.AppendLine("Processor Information:");
sb.AppendLine(GetManagementObject("Win32_Processor", "Name"));
sb.AppendLine(GetManagementObject("Win32_Processor", "Manufacturer"));
sb.AppendLine(GetManagementObject("Win32_Processor", "Description"));

🤝 Contributing

Contributions are welcome! Please fork this repository and submit pull requests.

  1. Fork the Repository
  2. Create a Feature Branch:
    git checkout -b feature-branch
  3. Commit Your Changes:
    git commit -m 'Add some feature'
  4. Push to the Branch:
    git push origin feature-branch
  5. Open a Pull Request

About

By leveraging various system management libraries and APIs, this application can gather details about the operating system, processor, memory, disk drives, and network adapters.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages