Results 1 to 4 of 4

Thread: [RESOLVED] Microsoft.VisualBasic Namespace

  1. #1

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Resolved [RESOLVED] Microsoft.VisualBasic Namespace

    I have a few developers that come from a VB6 background and occasionally they still use some of the functions available in the Microsoft.VisualBasic namespace. I am wondering if there is some way to either disable the usage of functions from this namespace or to put up a comiler warning whenever a function is used from this namespace.

    I really want the developers to use the common .Net methods, so that our C# developers can easily read their code without having to look up what some of the Microsoft.VisualBasic functions do.

  2. #2
    Fanatic Member Clanguage's Avatar
    Join Date
    Jan 2008
    Location
    North Carolina
    Posts
    659

    Re: Microsoft.VisualBasic Namespace

    I believe you can remove the namespace altogether but you may end up with broken apps.
    http://msdn.microsoft.com/en-us/library/3w4tctcf.aspx
    CLanguage;
    IF Post = HelpFull Then
    RateMe
    Else
    Say("Shut UP")
    End If
    DotNet rocks
    VB 6, VB.Net 2003, 2005, 2008, 2010, SQL 2005, WM 5.0,ahem ?OpenRoad?

  3. #3
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Microsoft.VisualBasic Namespace

    I believe that you can use FxCop as part of the build process and add custom rules that will generate the warnings you need.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  4. #4

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Microsoft.VisualBasic Namespace

    Thanks, FxCop looks like the way to go. I saw a few articles on writing custom rules and it doesn't look too dificult.

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