2019-08-26
using Microsoft.VisualBasic; // 半形轉全形 protected void Button_NarrowToWide_Click(object sender, EventArgs e) { // 加入參考 => .NET => Microsoft.VisualBasic // using Microsoft.VisualBasic; TextBox_SQL.Text = Strings.StrConv(TextBox_SQL.Text, VbStrConv.Wide, 0); } // 全形轉半形 protected void Button_WideToNarrow_Click(object sender, EventArgs e) { // 加入參考 => .NET => Microsoft.VisualBasic // using Microsoft.VisualBasic; TextBox_SQL.Text = Strings.StrConv(TextBox_SQL.Text, VbStrConv.Narrow, 0); } |
(完)
相關
Strings.StrConv(String, VbStrConv, Int32) Method
https://docs.microsoft.com/zh-tw/dotnet/api/microsoft.visualbasic.strings.strconv?redirectedfrom=MSDN&view=netframework-4.8#Microsoft_VisualBasic_Strings_StrConv_System_String_Microsoft_VisualBasic_VbStrConv_System_Int32_
沒有留言:
張貼留言