Compiler Error CS0020
Division by constant zero
An expression uses a literal (not variable) value of zero in the denominator of a division operation. Division by zero is not defined, and is therefore invalid.
The following sample generates CS0020:
C#
// CS0020.cs
namespace x
{
public class b
{
public static void Main()
{
1 / 0; // CS0020
}
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: