C# “as” cast vs classic cast
I've inherited some code and I see this Grid event handler. I don't know if there's a difference between these two statements, I wouldn't think there is, but the fact that they are back to back in the code makes me wonder why do the same thing two ways (assuming they do the same thing). Could someone explain the difference, if any?
GridDataItem ParentItem = e.Item as GridDataItem; GridDataItem NewRow = (GridDataItem)e.Item;