Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigboybamo patch 5 #42783

Merged
merged 6 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions docs/csharp/misc/cs1526.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ A new expression requires (), [], or {} after type

```csharp
// CS1526.cs
public class y
{
public static int i = 0;
public int myi = 0;
}
public class z
{
public static void Main()
{
y py = new y; // CS1526
y[] aoys = new y[10]; // Array of Ys
for (int i = 0; i < aoys.Length; i++)
aoys[i] = new y(); // an object of type y
}
}
public class y
{
public static int globalCounter = 0;
public int instanceCounter = 0;
}

public class z
{
public static void Main()
{
y yInstance = new y; // CS1526
y[] yArray = new y[10]; // Array of Ys

for (int i = 0; i < yArray.Length; i++)
yArray[i] = new y(); // an object of type y
}
}
```
Loading