c#中怎么释放一个字符串变量的值
来源:百度知道 编辑:UC知道 时间:2024/06/07 10:34:39
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;
namespace HaoltCalculator
...{
public partial class _MainFrm : Form
...{
private double nPrevValue = 0;//上一次值
private bool bAppend = true;//用户按的数字是否连接在显示的数字后面
private string strPrevOpar = "";//上一次的操作符号
public _MainFrm()
...{
InitializeComponent();
}
private void NumButton_Click(object sender, EventArgs e)
...{
if (bAppend)...{//在追加状态
Button btn = sender as Button;
if (btn.Text=="0")...{
if (textBoxResult.Text == "") ...{
textBoxResult.Text += "0";