Input code
Public Class A
Private x As Integer = 2
Private y(x) As Integer
End Class
Erroneous output
public class A
{
private int x = 2;
private int[] y = new int[x + 1];
}
Expected output
public class A
{
private int x = 2;
private int[] y;
public A()
{
y = new int[x + 1];
}
}
Details
Product in use: VS extension
Version in use: 6.6.0
Accessing a non-static field in C# is an error, where it allowed in VB (CS0236).
It's a bit more complicated than this, since you need to account for multiple constructors.
Input code
Erroneous output
Expected output
Details
Product in use: VS extension
Version in use: 6.6.0
Accessing a non-static field in C# is an error, where it allowed in VB (CS0236).
It's a bit more complicated than this, since you need to account for multiple constructors.