Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reformatting a string
Message
From
11/12/2007 22:09:49
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01274953
Message ID:
01275023
Views:
13
This message has been marked as a message which has helped to the initial question of the thread.
Is the .cs file in the same project as the rest of your code?
Is it in the same namespace?

>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]);
>        }
>    }
>}
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform