locked
Inline statements in VB: If-Else, For, For-Each, While, Do etc. RRS feed

  • Question

  • If True Then somtn'  
    Else nuttn' 'No need for EndIf  
     
    For Each item in items item.Clear 'No need for Next 

    There are many other statements

    Unless you Microsoft guys are sick of VB and decided to kick us as they did 2008 with automatic-propreties and collection initializers or inline delegates.
    Please mark post as helpful if you think it is...
    Shimmy
    Wednesday, March 4, 2009 12:04 AM

All replies

  • Actually (yes I know I am stupid), there is even a shoter way (only in the If statements but not in the other):

    If True Then Stop Else End 



    Shimmy
    Friday, March 6, 2009 2:36 AM