我需要帮助,当我在Windows c#应用程序名称"Game.exe"上运行时怎么做,以便在任务栏中应用程序名称"Game.exe"例如是"MegaCity.exe"?
谢谢
我有这个代码,它将是一个秒表.
为什么无法使用实例引用访问?
错误:无法使用实例引用访问成员'System.Diagnostics.Stopwatch.GetTimestamp()'; 用类型名称来限定它.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Diagnostics;
namespace Pocitadlo
{
public partial class Form1 : Form
{
public int minutys = 0, test = 0;
Thread sekund;
TimeSpan ts;
Stopwatch stopky = new Stopwatch();
public Form1()
{
InitializeComponent();
}
public void START_Click(object sender, EventArgs e)
{
sekund = new Thread(Sekund_pocet);
this.START.Visible = false;
this.STOP.Visible = true;
sekund.Start();
}
public void Sekund_pocet()
{
stopky.Start(); …Run Code Online (Sandbox Code Playgroud)