可能重複: What's the difference between encapsulating a private member as a property and defining a property without a private member? 我知道屬性和基本功能。但是當我縱深瀏覽文檔時,我發現他們只是在獲取集合並且沒有變量的情況下聲明的。 什麼是這兩個 public int E
我實際上更習慣於用Java語言開發應用程序。 但是,由於我的要求現在越來越嚴格,我需要跳到VB.NET 好啊......似乎需要適應一些。 無論如何,我在Visual Studio中輸入了大量的setter和getter屬性, Public Property supplierId() As Integer
Get
supplierId = iSupplierId
E
我正在開發一個ASP.NET項目,其中我在Visual Studio 2010中使用了VB.NET。項目中的其他一些開發人員正在使用Visual Studio 2008。我們都檢查我們的代碼到單個SVN存儲庫。我想開始使用VB.NET內自動實現的屬性... Property FirstName as String
的,而不是... Private FirstName as String