我希望转换bit类型为是或否
例如:
SELECT FirstName, LastName, IsMale from members
Run Code Online (Sandbox Code Playgroud)
结果:
Ramy Said 1
Run Code Online (Sandbox Code Playgroud)
预期结果:
Ramy Said Yes
Run Code Online (Sandbox Code Playgroud) 我正在尝试从字符串值中删除任何货币符号.
using System;
using System.Windows.Forms;
using System.Text.RegularExpressions;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
string pattern = @"(\p{Sc})?";
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
decimal x = 60.00M;
txtPrice.Text = x.ToString("c");
}
private void btnPrice_Click(object sender, EventArgs e)
{
Regex rgx = new Regex(pattern);
string x = rgx.Replace(txtPrice.Text, "");
txtPrice.Text = x;
}
}
}
// The example displays the following output:
// txtPrice.Text = "60.00";
Run Code Online (Sandbox Code Playgroud)
这有效,但不会删除阿拉伯语中的货币符号.我不知道为什么.
以下是带有货币符号的示例阿拉伯字符串.
txtPrice.Text = "?.?.? …Run Code Online (Sandbox Code Playgroud)