Add project files
This commit is contained in:
10
ConsoleApp1/ConsoleApp1.csproj
Normal file
10
ConsoleApp1/ConsoleApp1.csproj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
15
ConsoleApp1/ISystem.cs
Normal file
15
ConsoleApp1/ISystem.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp1
|
||||
{
|
||||
internal interface ISystem
|
||||
{
|
||||
bool Start();
|
||||
void Restart();
|
||||
void Quit();
|
||||
}
|
||||
}
|
||||
2
ConsoleApp1/Program.cs
Normal file
2
ConsoleApp1/Program.cs
Normal file
@@ -0,0 +1,2 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
Console.WriteLine("Hello, World!");
|
||||
31
ConsoleApp1/System.cs
Normal file
31
ConsoleApp1/System.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp1
|
||||
{
|
||||
public class System : ISystem
|
||||
{
|
||||
private string name;
|
||||
private string version;
|
||||
private string sn;
|
||||
|
||||
public System(string name, string version, string sn)
|
||||
{
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public string Name => this.name;
|
||||
public string Version => this.version;
|
||||
public string SN => this.sn;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Name: {this.name}\nVersion: {this.version}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user