C#的奮鬥和小白的問題 - 在下面的代碼,什麼是行c#變量聲明中「單個空間」的含義?
UIWindow window;
意味着什麼,什麼是它與線的關係
window = new UIWindow (UIScreen.MainScreen.Bounds);
是「一個UIWindow窗口」某種變量宣言?
public partial class AppDelegate : UIApplicationDelegate
{
UIWindow window;
HelloWorld_iPhoneViewController viewController;
/// <summary>
/// This method is invoked when the application has loaded and is ready to run. In this
/// method you should instantiate the window, load the UI into it and then make the window
/// visible.
/// </summary>
/// <remarks>
/// You have 5 seconds to return from this method, or iOS will terminate your application.
/// </remarks>
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
viewController = new HelloWorld_iPhoneViewController ("HelloWorld_iPhoneViewController", null);
window.RootViewController = viewController;
window.MakeKeyAndVisible();
return true;
}
}
如果你真的不知道這一點,你是在一個漫長的一天。在嘗試編寫(或理解)C#代碼之前,最好先做一些基本的自我教育。 –
我同意史蒂夫 - [C#信息頁面](http://stackoverflow.com/tags/c%23/info)包含學習參考。 – 2012-11-29 19:58:38
@SteveTownsend好吧這將是一個漫長的一天無論如何:)我來自JavaScript的一切都是「var window」等。 – Petrov