Results 1 to 3 of 3

Thread: Regex Class library class declaration error ?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    Regex Class library class declaration error ?

    In the program to convert Vietnamese from accented to unsigned in C#, use the code in:

    https://www.dtmi.net/chuyen-tieng-vi...va-sql-server/
    https://docs.microsoft.com/en-us/dot...x?view=net-5.0

    I declare the library using System.Text.RegularExpressions; and added the library System.Text.RegularExpressions.dll but still got the error like in the picture Name:  err03Regex.jpg
Views: 175
Size:  38.8 KB

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Regex Class library class declaration error ?

    Your post is garbage, as usual. You posted a small, incomplete picture of code instead of posting code that we can copy, paste and test for ourselves. It's not obvious from the picture of the code but, based on the error messages and the indenting of the code, it appears that you have put method declarations directly in the namespace, instead of putting a type - probably a class - in the namespace and then the method(s) in that. If you'd posted the actual code then we'd be able to see for sure. The structure of the code file should look pretty much like this:
    csharp Code:
    1. using NameSpaceImportHere;
    2.  
    3. namespace NameSpaceHere
    4. {
    5.     public class TypeHere
    6.     {
    7.         public void MethodHere()
    8.         {
    9.             // ...
    10.         }
    11.     }
    12. }

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    Re: Regex Class library class declaration error ?

    The program is working fine, thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width