The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Downcasting in Visual Basic.NET
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Goofy GiraffePosted Nov 6, 2009, 6:53 AM
This works without having to directcast to Object as in the lines highlighted in yellow. The below code works just as good : DirectCast(pers, Lawyer).NumberOfClientsShafted.ToString() & _ Environment.NewLine) sb.Append("Number of Lies Told: " + _ DirectCast(pers, Lawyer).NumberOfLiesTold.ToString() & _ Environment.NewLine)