Need help decifering a concept...


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Can someone help me decifer this line of code? I saw it somewhere and have used it a couple of times but I'm not sure what the concept is called or why it works.



Me.cboDivisions.Properties.GetDataSourceRowByKeyValue(Me.cboDivisions.EditValue)("LocationID").ToString



If this piece of code were to take up two lines this is what it would look like this



Dim row As DataRowView = Me.cboDivisions.Properties.GetDataSourceRowByKeyValue(Me.cboDivisions.EditValue)

Messagebox.Show(row("LocationID").ToString)



I'm referring to the way I can butt the set of parenthesis together.



Thanks for the help. Cool
Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
In CSharp, the indexer properties cannot use the property name, but instead, they use the square brackets, so it looks like this instead:

this.cboDivisions.Properties.GetDataSourceRowByKeyValue(Me.cboDivisions.EditValue)["LocationID"].ToString();

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search