Antonio Esposito's


Prodotti tipici .NETtiani

Property Autoimplementate

Novità del Visual basic 2010 saranno le property autoimplementate così come accaduto già per c# nella scorsa edizione (2008)

Una property normale in VB.NET si scrive così:
private _name as String
public property Name as string
  get
    return _name
  end get
  set(value as string)
    _name = value
  end set
end property

In c# invece:
public string Name {get; set; } //molto più conciso....

Finalmente in VB 2010

public property Name as string ' ;))))

 

Categoria: Tips
giovedì, 14 gen 2010 Ore. 17.23
Statistiche
  • Views Home Page: 10.695
  • Views Posts: 58.917
  • Views Gallerie: 0
  • n° Posts: 44
  • n° Commenti: 16
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003