Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Error 18 Only assignment, call, increment, decrement, and new object e

$
0
0
Hi,
I'm trying to check if the row and column are within the bounds of the rectangular array.
If they are within the bounds, it returns what is at the board at position row, column.
I can' return what is at the board at position row, column?

public static int[,] Get(int row, int column)
{
if (row <= 0 || row > 9 && column <= 0 || column > 9)
    {
        get{return row;}
        get{return column;}
    }

    else

    {
    return null;
    }
}   



I've tried:
// Reference: http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k%28GET%29;k%28TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22%29;k%28DevLang-CSHARP%29&rd=true, viewed 201301111220. // public int row{get;} // Console.WriteLine(int row, int column); // Console.WriteLine(int[,] row, int [,] column); // Console.WriteLine(row[,], column[,]); // Console.WriteLine(int row, column); // Console.WriteLine(int[,] row, column); // Console.WriteLine(int[,] row, int[,] column);

// public int column{get;} // Reference: http://msdn.microsoft.com/en-us/library/Dd886095%28v=vs.100%29.aspx?appId=Dev10IDEF1&l=EN-US&k=k%28COLUMN%29%3bk%28TargetFrameworkMoniker-%22.NETFRAMEWORK,VERSION%3dV4.0%22%29%3bk%28DevLang-CSHARP%29&rd=true, viewed 201201111216.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>