我有一个
List<Tuple<string,string>> tr = new List<Tuple<string,string>>();
tr.Add(new Tuple<string, string>("Test","Add");
tr.Add(new Tuple<string, string>("Welcome","Update");
foreach (var lst in tr)
{
if(lst.Contains("Test"))
MessageBox.Show("Value Avail");
}
Run Code Online (Sandbox Code Playgroud)
这样做我失败了,....
我有一个字符串,我正在使用GEMBOX SPREADSHEET
string sr = “Save as type”;
Run Code Online (Sandbox Code Playgroud)
在这 - 保存类型 - 是正常的字符串,但当我加载文本文件时使用GEMBOX
这个符号
“Save as type”
Run Code Online (Sandbox Code Playgroud)
被转换为
?Save as type?
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?当我尝试实现它时,这就是代码
65533
Run Code Online (Sandbox Code Playgroud) 如果我的表单,我只想清除剪贴板文本LostFocus.我的意思是,如果用户使用键盘或鼠标复制某些内容,必须在LostFocus事件中清除它,那么如果我的表单再次获得焦点,我需要恢复我的文本.我怎样才能做到这一点?
string sValue = "";
public Form1()
{
InitializeComponent();
this.LostFocus += new EventHandler(Form1_LostFocus);
this.GotFocus += new EventHandler(Form1_GotFocus);
}
void Form1_GotFocus(object sender, EventArgs e)
{
Clipboard.SetText(sValue);
textBox1.Text = Clipboard.GetText();
}
void Form1_LostFocus(object sender, EventArgs e)
{
sValue = textBox1.Text;
Clipboard.Clear();
}
Run Code Online (Sandbox Code Playgroud)
这不起作用; 该LostFocus事件被调用,但GotFocus没有被调用.我怎么解决这个问题?