Posts Tagged ‘vb’

replacing the private variable of public members with dependancy properties

Thursday, April 24th, 2008

Public StatusProperty As DependencyProperty = _
DependencyProperty.RegisterAttached(”Status”, GetType(String), GetType(Window))

Property Status() As String
Get
Return GetValue(StatusProperty)
End Get
Set(ByVal value As String)
SetValue(StatusProperty, value)
End Set
End Property

linq left outer join with visual basic and linqtosql

Thursday, April 24th, 2008

result = _
From master In dc.Masters _
Where (master.name.Contains(txtSearch.Text) _
Group Join detail In dc.details On master Equals detail.Master Into both = Group _
From b In both.DefaultIfEmpty _
Select New With {.master = master, .detail = If(master.Details.Count = 0, New Detail, b)}