Tag: C# Errors

C# Compiler Warning – CS1998 this async method lacks ‘await’ operator

In this blog post, you’ll learn more about the C# Compiler Warning – CS1998 and the related message description C# Compiler Warning Code CS1998 C# Compiler Description for the Code :CS1998 This async method lacks ‘await’ operators and will run synchronously. Consider using the ‘await’ operator to await non-blocking API calls, or ‘await Task.Run(…)’ to do CPU-bound work on a background thread.

C# Compiler Error – CS4011 ‘await’ requires that the return type ‘{

In this blog post, you’ll learn more about the C# Compiler Error – CS4011 and the related message description C# Compiler Error Code CS4011 C# Compiler Description for the Code :CS4011 ‘await’ requires that the return type ‘{0}’ of ‘{1}.GetAwaiter()’ have suitable ‘IsCompleted’, ‘OnCompleted’, and ‘GetResult’ members, and implement ‘INotifyCompletion’ or ‘ICriticalNotifyCompletion’

C# Compiler Warning – CS8669 the annotation for nullable reference ty

In this blog post, you’ll learn more about the C# Compiler Warning – CS8669 and the related message description C# Compiler Warning Code CS8669 C# Compiler Description for the Code :CS8669 The annotation for nullable reference types should only be used in code within a ‘#nullable’ annotations context. Auto-generated code requires an explicit ‘#nullable’ directive in source.