Before the stable release this chunk of code used to compile fine:
/// <summary>
/// Returns the bounds for the device's <c>MainScreen</c> adjusted to fit the current <c>UIInterfaceOrientation</c>
/// </summary>
/// <value>The rotated screen bounds.</value>
internal static RectangleF RotatedScreenBounds{
get {
RectangleF bounds;
//Adjust view to match current interface orientation
switch (currentDeviceOrientation) {
case UIInterfaceOrientation.LandscapeLeft:
case UIInterfaceOrientation.LandscapeRight:
bounds = new RectangleF (0, 0, UIScreen.MainScreen.Bounds.Height, UIScreen.MainScreen.Bounds.Width);
break;
case UIInterfaceOrientation.Portrait:
case UIInterfaceOrientation.PortraitUpsideDown:
bounds = new RectangleF (0, 0, UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height);
break;
}
//Return results
return bounds;
}
}
Now I get an error at return bounds;
that say Use of unassigned local variable 'bounds' even though all paths through the case statement set a value to bounds.
Note that this code worked correctly before.