Horje
async method out parameter c# Code Example
async method out parameter c#
// NOTE: You can't have async methods with ref or out parameters.

public async Task Method1()
{
    var result = await TestAsync();
    int code = result.successCode;
    bool error = tuple.error;
}

// A workaround for this is to just return a tuple 
public async Task<(int successCode, bool error)> TestAsync()
{
    //...
    return (1, true);
}




Csharp

Related
how to add serilog to your asp.net project Code Example how to add serilog to your asp.net project Code Example
close an open form when you open it again c# Code Example close an open form when you open it again c# Code Example
select every second row in html table Code Example select every second row in html table Code Example
difference between awake and start unity Code Example difference between awake and start unity Code Example
error the property is part of the object's key Code Example error the property is part of the object's key Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7