Questions tagged [vb.net]

Visual Basic.NET (VB.NET) is a multi-paradigm, managed, type-safe, object-oriented computer programming language. Along with C# and F#, it is one of the main languages targeting the .NET Framework. VB.NET can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft .NET Framework. DO NOT USE this tag for VB6, VBA or VBScript questions.

Microsoft's Visual Basic .NET (VB.NET) is a multi-paradigm, managed, type-safe, object-oriented computer programming language. Along with C# and F#, it is one of the main languages targeting the .NET Framework. VB.NET can be viewed as an evolution of Microsoft's Visual Basic 6, but implemented on the Microsoft .NET Framework. This is reflected in VB.NET's version numbering, which continues from VB6. Although Microsoft decided to drop the ".NET" portion of the language's name in 2005, it is still often referred to that way in order to distinguish it from its predecessors.

This tag should only be used for questions which relate to .NET versions of VB. It should not be confused with , , or . Although those languages share a similar syntax with VB.NET, they are entirely different technologies.

To date, the following versions of VB.NET have been released:

VB.NET is supported in a wide range of platforms:

Popular VB.NET questions on Stack Overflow

Resources

134281 questions
11
votes
19 answers

C#'s edge over VB

What in C#.NET makes it more suitable for some projects than VB.NET? Performance?, Capabilities?, Libraries/Components?, Reputation?, Reliability? Maintainability?, Ease? Basically anything C# can do, that is impossible using VB, or vice…
Robin Rodricks
  • 99,791
  • 133
  • 372
  • 575
11
votes
2 answers

.Net WebServices and out/ref WebMethod arguments

I've received some documentation from one of our suppliers for a webservice they're publishing and they're very specific that on one of their WebMethods that an argument has the out modifier(? not sure if that's the right descriptor) for instance…
BenAlabaster
  • 36,299
  • 19
  • 100
  • 147
11
votes
5 answers

Adding own event handler in front of other event handlers

When I utilize AddHandler in VB to add my own method to the Click event : AddHandler Button.Click, AddressOf myButton_Click I see that my code executes last - after other event handlers for the Button_Click event. Is there a way to insert my…
Meringros
  • 354
  • 4
  • 13
11
votes
4 answers

Set WCF ClientCredentials in App.config

Is it possible to set clientcredentials for an WCF in App.config? I would like to avoid doing this: Using svc As New MyServiceClient svc.ClientCredentials.UserName.UserName = "login" svc.ClientCredentials.UserName.Password = "pw" ... End…
Jakob Gade
  • 11,803
  • 13
  • 64
  • 111
11
votes
3 answers

VB.Net Delete all files in folder

I am trying to delete all files from single folder in VB.Net but to keep that folder. As far as i know, i can delete files by this way: Dim heart17 As System.IO.FileInfo = New IO.FileInfo("path") heart17.Delete() And it works, but i need to empty a…
Stefan Đorđević
  • 446
  • 1
  • 3
  • 18
11
votes
5 answers

How to retrieve my Gmail messages using Gmail API?

What I want to achieve: I'm using the Gmail API and basically I would like to connect to my GMail account to read my emails, of INBOX category, and get basic info for each message (title/subject, from, to, date, and the sender). Problems: I'm…
ElektroStudios
  • 17,150
  • 31
  • 162
  • 376
11
votes
4 answers

How do I override Microsoft's datagridview to allow back buffering in VB.NET?

My datagridview flickers and is very slow while loading. I reflectored the datgridview from Microsoft and discovered that there is a back buffer property which is not visible from the winForm. How do I set this property?
Michael Eakins
  • 4,121
  • 3
  • 31
  • 54
11
votes
4 answers

Differences between 32 and 64-bit .NET (4) applications

What are the differences between 32 and 64-bit .NET (4) applications? Often 32-bit applications have problems running on 64-bit machines and conversely. I know I can declare an integer as int32 and int64 (certainly int64 on 32-bit systems make…
Mimefilt
  • 640
  • 8
  • 20
11
votes
1 answer

TryCast fails where DirectCast works (.NET 4.0)

I find this behavior of TryCast in .NET 4.0 / VS 2010 rather confusing. In my understanding TryCast works like DirectCast, but will return Nothing instead of throwing an exception if a cast is not possible. VS 2010 / .NET 4 ?TryCast(CType(1,…
motto
  • 1,217
  • 3
  • 16
  • 30
11
votes
2 answers

ASP.NET: Roslyn slow on page changes

i have an VB.NET ASP.NET (4.6.1) MVC Application which is build with the new Roslyn Compilers. Everytime i change a (vbhtml) File and reload the page it takes approx 9 seconds to reload the page. In this time a vbc.exe and a VBCSCompiler.exe are…
Christoph
  • 885
  • 1
  • 12
  • 21
11
votes
6 answers

Is there a built in way in .Net AJAX to manually serialize an object to a JSON string?

I've found ScriptingJsonSerializationSection but I'm not sure how to use it. I could write a function to convert the object to a JSON string manually, but since .Net can do it on the fly with the and…
travis
  • 33,392
  • 20
  • 68
  • 93
11
votes
1 answer

Getting the variable name for NullReferenceException

Stack traces for NullReferenceException is very uninformative, they just include the method name and the call stack. Any variable in a method can be null and it's hard to debug when the bug isn't reproducible on the dev machine. Do you know a way to…
Elmo
  • 5,743
  • 15
  • 64
  • 132
11
votes
1 answer

IDisposable.Dispose() not called in Release mode for async method

I wrote the following WPF sample app in VB.NET 14 using .NET 4.6.1 on VS2015.1: Class MainWindow Public Sub New() InitializeComponent() End Sub Private Async Sub Button_Click(sender As Object, e As RoutedEventArgs) …
Nick Muller
  • 1,399
  • 11
  • 32
11
votes
2 answers

Custom control becomes generic "UserControl" and not its actual type in Designer class

I have a custom control in ASP.NET (VB.NET in code behind), defined with an ASCX: <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="MyControl.ascx.vb" Inherits="Mynamespace.Controls.MyControl" %>