using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp1
{
internal class Program
{
bool flag = false;
string id = "1qaz2wsx";
int age = 23;
static void Main(string[] args)
{
Console.WriteLine("你好世界 \r \n 输入数字 计算 10 倍结果 ");
try
{
String v = Console.ReadLine();
System.Console.Write(v);
int result = int.Parse(v) * 10;
wt("result is " + result);
Console.ReadLine();
}
catch (Exception ex)
{
wt("发生了程序异常 \r\n 堆栈信息:");
Console.WriteLine(ex.ToString());
wt("*" + "---------------------------------------");
}
wt(" chengfabiao");
int num = 0;
string name = "lusifer";
for (int i = 1; i < 10; i++)
{
for (global::System.Int32 j = 1; j <= i; j++)
{
System.Console.Write(j + " X" + i + " = " + (i * j) + " ");
}
System.Console.WriteLine();
}
UserLoginBody ulb = new UserLoginBody();
wt("login page 登录页面 \r\n ---------- 请输入用户名:");
ulb.setName(Console.ReadLine());
ulb.setPassword(Console.ReadLine());
wt("your input text is {}" + ulb.ToString());
Console.ReadLine();
}
static void wt(object param)
{
Console.WriteLine(param);
}
}
class User
{
public int id;
public string name;
public int age;
}
}
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 项目“..\domain\domain.csproj”指向“net8.0”。它不能被指向“.NETFramework,Version=v4.7.2”的项目引用。 ConsoleApp1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
internal class DataBaseImpl
{
}
class UserLoginBody {
private string password;
private string name;
public string getName()
{
return this.name;
}
public string getPassword() {
return this.password;
}
public void setName(string name) {
this.name = name;
}
public void setPassword(string password)
{
this.password = password;
}
}
}