我的情景,
怎么转换List<KeyValuePair<string, string>>成 IDictionary<string, string>?
我的情景:
void Installer1_AfterInstall(object sender, InstallEventArgs e)
{
try
{
MainWindow ObjMain = new MainWindow();
ObjMain.Show();
}
catch (Exception ex)
{
Log.Write(ex);
}
}
Run Code Online (Sandbox Code Playgroud)
我收到错误"调用线程必须是STA,因为许多UI组件需要这个"
我所做的?
我的情景:
当我使用www.google.com ping时,它会提供成功状态,当我尝试ping http://stackoverflow.com时, 我收到异常"Ping请求期间发生异常".是什么原因?我怎么解决?
using (Ping png = new Ping())
{
PingReply pr = png.Send("http://stackoverflow.com");
string status= pr.Status.ToString();
}
Run Code Online (Sandbox Code Playgroud) 我想匹配 [ 和 ] 之间的任何字符串。以下代码工作正常,但我想输出没有这个符号 []
我的代码:
string strValue = "{test}dfdgf[sms]";// i want to sms
private void Form1_Load(object sender, EventArgs e)
{
Match mtch = Regex.Match(strValue, @"\[((\s*?.*?)*?)\]");
if (mtch.Success)
{
MessageBox.Show(mtch.Value);
}
}
Run Code Online (Sandbox Code Playgroud) 我想通过使用来阅读我的Gmail收件箱Google.GData.Client.dll.我该如何做到这一点?我想要一个示例程序.
我的应用程序需要Adobe Flash Player正常运行,我需要它来检查它是否已安装.
那么如何在PC上安装Adobe Flash player来检查应用程序?
我的程序是用C#编写的