Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reformatting a string
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01274953
Message ID:
01275066
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
Make the method public

>Craig
>
>Thanks for the input!! I put it in a separate class file, but it doesn't show up in intelisense, do you know how I would call it from another section of code? Thanks I know that's really a newby question, but I'm trying to figure out this C#.
>
>Thanks
>Kirk
>
>
>using System;
>using System.Collections.Generic;
>using System.Text.RegularExpressions;
>using System.Text;
>
>namespace SocketServer
>{
>    public class myFunctions
>    {
>        private string ReformatPhone(string phone)
>        {
>            Match m = Regex.Match(phone, @"^\(?(\d{3})\)?[\s\-]?(\d{3})\-?(\d{4})$");
>            return String.Format("{0}-{1}-{2}", m.Groups[1], m.Groups[2], m.Groups[3]);
>        }
>    }
>}
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform