小编use*_*264的帖子

C#名称流程

我需要帮助,当我在Windows c#应用程序名称"Game.exe"上运行时怎么做,以便在任务栏中应用程序名称"Game.exe"例如是"MegaCity.exe"?

谢谢

c# process winforms

2
推荐指数
1
解决办法
919
查看次数

我的StopWatch错误(GetTimestamp)

我有这个代码,它将是一个秒表.

为什么无法使用实例引用访问?

错误:无法使用实例引用访问成员'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)

c# stopwatch

-1
推荐指数
1
解决办法
164
查看次数

标签 统计

c# ×2

process ×1

stopwatch ×1

winforms ×1