提取文本框中的部分数字 [英] extract part of the number in the text box

查看:124
本文介绍了提取文本框中的部分数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个国家/地区代码查找器,我有一个屏蔽文本框,用于输入电话号码,并希望从中提取代码编号,并查找该国家/地区属于该代码编号oi需要您的帮助才能提取代码并查找我的数据库中的代码

I'm creating a country code finder i have a masked text box to enter the phone numbers and want to extract the code number from it and find the country belongs to that code number oi need your help to extract the code and find the code from my database

推荐答案

mskTexte 你的 maskedTextBox (99)000-0000 是您手机号码的掩码。然后你可以使用以下代码提取国家代码

Let mskTexte your maskedTextBox and (99) 000-0000 be your mask for mobile number. then you can extract the country code by using the following code
Dim countryCode As String = mskText.Text.Substring(1, 2)


这篇关于提取文本框中的部分数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆