Profile
Stats
1,752
reputation
218k
reached
13
answers
39
questions
Loading…
About
class Program
{
public readonly IList<int> data = [1, 2, 3];
static void Main(string[] args)
{
var p = new Program()
{
data = { 4, 5, 6 } // appending :-)
};
Console.WriteLine(string.Join(",", p.data));
}
}
static async Task Main()
{
var f = async (char c) =>
{
for (int i = 0; i < 5; ++i)
{
Console.WriteLine(c);
await Task.Yield();
}
};
Console.WriteLine("Begin");
var a = f('*');
var b = f('-');
await Task.WhenAll(a, b);
Console.WriteLine("End");
}
and
async function Main() {
let f = async (c) => {
for (let i = 0; i < 5; ++i) {
console.log(c)
await Promise.resolve();
}
}
console.log('Begin');
const a = f('*');
const b = f('-');
await Promise.all([a, b]);
console.log('End');
}
Badges
View all badges
This user doesn’t have any gold badges yet.
10
silver badges
-
InquisitiveMay 12
-
NecromancerMay 16, 2020
-
Yearling
× 8May 15
Top tags
View all tags18
Score
28
Posts
54
Posts %
11
Score
5
Posts
10
Posts %
2
Score
2
Posts
4
Posts %
0
Score
5
Posts
10
Posts %
0
Score
3
Posts
6
Posts %
0
Score
2
Posts
4
Posts %