Click here to Skip to main content
15,860,859 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: API Keys Pin
aparnashukla2623-Dec-22 1:18
aparnashukla2623-Dec-22 1:18 
AnswerRe: API Keys Pin
Gerry Schmitz23-Dec-22 2:05
mveGerry Schmitz23-Dec-22 2:05 
GeneralRe: API Keys Pin
Mycroft Holmes23-Dec-22 12:13
professionalMycroft Holmes23-Dec-22 12:13 
QuestionSetup Project not found in template Pin
Benniit17-Dec-22 18:23
Benniit17-Dec-22 18:23 
AnswerRe: Setup Project not found in template Pin
Richard Deeming18-Dec-22 21:23
mveRichard Deeming18-Dec-22 21:23 
GeneralRe: Setup Project not found in template Pin
Benniit18-Dec-22 21:48
Benniit18-Dec-22 21:48 
QuestionImports Excel = Microsoft.Office.Interop.Excel Pin
LAMBERT Georges5-Dec-22 2:52
LAMBERT Georges5-Dec-22 2:52 
AnswerRe: Imports Excel = Microsoft.Office.Interop.Excel Pin
Ralf Meier5-Dec-22 2:57
professionalRalf Meier5-Dec-22 2:57 
AnswerRe: Imports Excel = Microsoft.Office.Interop.Excel Pin
Richard MacCutchan5-Dec-22 3:19
mveRichard MacCutchan5-Dec-22 3:19 
AnswerRe: Imports Excel = Microsoft.Office.Interop.Excel Pin
jsc425-Dec-22 22:46
professionaljsc425-Dec-22 22:46 
QuestionRemove pesky "zombie" icons from the Windows System Tray Pin
Dan Desjardins28-Nov-22 4:40
Dan Desjardins28-Nov-22 4:40 
SuggestionRe: Remove pesky "zombie" icons from the Windows System Tray Pin
Richard Deeming28-Nov-22 21:22
mveRichard Deeming28-Nov-22 21:22 
GeneralRe: Remove pesky "zombie" icons from the Windows System Tray Pin
Dan Desjardins29-Nov-22 2:19
Dan Desjardins29-Nov-22 2:19 
GeneralRe: Remove pesky "zombie" icons from the Windows System Tray Pin
Richard Deeming29-Nov-22 2:44
mveRichard Deeming29-Nov-22 2:44 
Dan Desjardins wrote:
I thought an async function should always return a value
Perhaps you were confused by the valid "avoid async void" warning - in VB.NET, that would be the equivalent of an Async Sub:
Avoid async void methods | You’ve Been Haacked[^]

An Async Function that returns a non-generic Task is similar to a synchronous Sub that doesn't return anything. An Async Function that returns Task(Of Foo) is similar to a synchronous Function that returns Foo.

In other words:
VB.NET
Sub PrintSync()
   ...
End Sub

PrintSync()
would become:
VB.NET
Async Function PrintAsync() As Task
    ...
End Function

Await PrintAsync()

And:
VB.NET
Function CalculateSync() As Integer
    ...
    Return 42
End Function

Dim i As Integer = CalculateSync()
would become:
VB.NET
Async Function CalculateAsync() As Task(Of Integer)
    ...
    Return 42
End Function

Dim i As Integer = Await CalculateAsync()




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Remove pesky "zombie" icons from the Windows System Tray Pin
Dan Desjardins29-Nov-22 4:19
Dan Desjardins29-Nov-22 4:19 
QuestionAttendance Machine IP Connected / Disconnected Pin
Member 132153538-Nov-22 18:23
Member 132153538-Nov-22 18:23 
AnswerRe: Attendance Machine IP Connected / Disconnected Pin
Richard Deeming8-Nov-22 21:39
mveRichard Deeming8-Nov-22 21:39 
GeneralRe: Attendance Machine IP Connected / Disconnected Pin
Member 1321535310-Nov-22 23:38
Member 1321535310-Nov-22 23:38 
GeneralRe: Attendance Machine IP Connected / Disconnected Pin
Richard MacCutchan11-Nov-22 1:35
mveRichard MacCutchan11-Nov-22 1:35 
QuestionRe: Attendance Machine IP Connected / Disconnected Pin
Eddy Vluggen11-Nov-22 6:46
professionalEddy Vluggen11-Nov-22 6:46 
AnswerRe: Attendance Machine IP Connected / Disconnected Pin
Gerry Schmitz11-Nov-22 6:50
mveGerry Schmitz11-Nov-22 6:50 
GeneralRe: Attendance Machine IP Connected / Disconnected Pin
Eddy Vluggen11-Nov-22 13:25
professionalEddy Vluggen11-Nov-22 13:25 
QuestionMaking VC++ 6 DLL to work on VB6 App with no UNICODE issue Pin
whiteboat27-Oct-22 19:28
whiteboat27-Oct-22 19:28 
AnswerRe: Making VC++ 6 DLL to work on VB6 App with no UNICODE issue Pin
Victor Nijegorodov27-Oct-22 20:43
Victor Nijegorodov27-Oct-22 20:43 
GeneralRe: Making VC++ 6 DLL to work on VB6 App with no UNICODE issue Pin
whiteboat27-Oct-22 21:24
whiteboat27-Oct-22 21:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.