The text of this article is not in this database — only its details are. Read it on the old site: Downcasting in Visual Basic.NET
1 Comment
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: Downcasting in Visual Basic.NET
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
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)