Can you make VB.NET compilation as strict as C#?
        Posted  
        
            by pete the pagan-gerbil
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by pete the pagan-gerbil
        
        
        
        Published on 2010-03-12T11:47:38Z
        Indexed on 
            2010/03/12
            11:57 UTC
        
        
        Read the original article
        Hit count: 224
        
In VB.NET, it is entirely possible to pass an integer as a string parameter to a method without calling .ToString() - it's even possible to call .ToString without the ()'s. The code will run without a problem, VB will interpret the integer as a string without having been told to.
In C#, these would cause compilation errors - you are required to call .ToString() and to call it correctly in that situation before it will compile.
Is there a way to make the VB compilation process check for the same things as the C# compilation process? Would it be best practice in a mixed team to force this check?
© Stack Overflow or respective owner