VB.NET equivalent of C# property shorthand?

There is no shorthand for Visual Studio 2008 or prior for VB.NET. In Visual Studio 2010 and beyond, you can use the following shorthand: Public Property FirstName as String This will be handled as your short version in C# is – I think they call it “Auto Property” See also: Auto-Implemented Properties (Visual Basic)

VB.NET IntelliSense : Disable newline on ENTER autocomplete

UPDATE VISUAL STUDIO 2017: Now with Visual Studio 2017 you can change it. Tools -> Options -> Text Editor -> Basic -> IntelliSense. In Enter key behavior select Never add new line on enter ANSWER FOR VISUAL STUDIO 2015 AND PREVIOUS: If you want to avoid inserting new line on enter with autocomplete suggestion, just … Read more

Why C# fails to compare two object types with each other but VB doesn’t?

In C#, the == operator (when applied to reference type expressions) performs a reference equality check unless it’s overloaded. You’re comparing two references which are the result of boxing conversions, so those are distinct references. EDIT: With types which overload the ==, you can get different behaviour – but that’s based on the compile-time type … Read more

Auto column width in EPPlus

Use AutoFitColumns, but you have to specify the cells, i assume the entire worksheet: VB.NET Worksheet.Cells(Worksheet.Dimension.Address).AutoFitColumns() C# Worksheet.Cells[Worksheet.Dimension.Address].AutoFitColumns(); Please note you need to call this method after filling the worksheet.

How to have comments in IntelliSense for function in Visual Studio?

To generate an area where you can specify a description for the function and each parameter for the function, type the following on the line before your function and hit Enter: C#: /// VB: ”’ See Recommended Tags for Documentation Comments (C# Programming Guide) for more info on the structured content you can include in … Read more