Closed
Description
Type of issue
Typo
Description
Consider the following code snippet from example 3:
public static void Main(string[] args)
{
Square square = new Square("red", 5);
Console.WriteLine("Area of the square: {square.CalculateArea()}");
}
The Console.WriteLine statement is missing '$' to use string interpolation, so the area is not being printed, but rather "{square.CalculateArea()}".
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/abstract
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/keywords/abstract.md
Document Version Independent Id
8c00f924-bf5a-a748-331d-3809321e5547
Platform Id
b426e06e-544c-bc49-3357-dfe8e7916acc
Article author
Metadata
- ID: c00e23c2-618d-0b84-8ea8-0b0b4de1101a
- PlatformId: b426e06e-544c-bc49-3357-dfe8e7916acc
- Service: dotnet-csharp
- Sub-service: lang-reference