c敏锐的编程语言 [英] c sharp programing language

查看:107
本文介绍了c敏锐的编程语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个可以上传电话号码,显示电话号码的代码,如果电话号码是有效的电话号码,请向该号码发送短信.

从OP的解决方案"中移出:

i need a code that will upload phone numbers, display the numbers and if a number is a valid phone number, send sms message to the number.

Moved from OP''s "solution":

namespace _11_RegularExpressions
{
    class Class1
    {
        [STAThread]
        static void Main(string[] args)
        {
            Regex phoneExp = new Regex(@"^(234[7|8][0|1][2-9])([0-9]{7}$");
            string input;
            Console.Write("Enter a phone number: ");
            input = Console.ReadLine();
            while (phoneExp.Match(input).Success == false)
            {
                Console.WriteLine("Invalid input. Try again.");
                Console.Write("Enter a phone number: ");
                input = Console.ReadLine();
            }
            Console.WriteLine("Validated!");


[/Edit]


[/Edit]

推荐答案

"); 字符串输入; Console.Write(" ); 输入= Console.ReadLine(); 同时(phoneExp.Match(输入).成功== false ) { Console.WriteLine(" ); Console.Write(" ); 输入= Console.ReadLine(); } Console.WriteLine(" );
"); string input; Console.Write("Enter a phone number: "); input = Console.ReadLine(); while (phoneExp.Match(input).Success == false) { Console.WriteLine("Invalid input. Try again."); Console.Write("Enter a phone number: "); input = Console.ReadLine(); } Console.WriteLine("Validated!");


[/Edit]


[/Edit]


您的解决方案是拿起C#教科书并阅读.然后写一些代码.当该代码中有错误时,请向我们询问这些错误,我们将很乐意为您提供帮助.我们不会为您做家庭作业.
Your solution is to pick up your C# textbooks and read them. Then write some code. When that code has bugs, ask us regarding those bugs and we''ll be glad to help you. We will NOT do your homework for you.


您要如何发送短信?我有使用Google Voice和php完成我与MS Access集成的代码,可以使用C#实现
Google语音API
How do you want send SMS ? I have code to do it with Google Voice and php I did integrated with MS Access you can do it with C#
Google voice api


这篇关于c敏锐的编程语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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