To answer your main question
#region Tile and Tile Sheet Handling
public static int TilesPerRow
{
get { return tileSheet.Width / TileWidth; }
}
This is a readonly property. When you try to access it by calling YourClass.TilesPerRow
it executes the code in the block and returns that value.
The get
is called an Accessor. There is also a set accessor as explained by MSDN
The code block for the get accessor is executed when the property is read; the code block for the set accessor is executed when the property is assigned a new value. A property without a set accessor is considered read-only. A property without a get accessor is considered write-only. A property that has both accessors is read-write.
Because the property has no set
you cannot assign a value to this property making it readonly.
Here is the MSDN guide for properties:
http://msdn.microsoft.com/en-us/library/vstudio/w86s7x04.aspx
In your case it is dividing the total width of the sheet by the width of a tile. This leads to the total number of tiles that can be placed in a row (as the name implies).