Give An example of a ctype and directcast.

Answer Posted / sajid

Dim t As String = "5"
Dim s As Integer = CType(t, Integer)

Dim t As String = "5"
Dim w As String = DirectCast(t, String)

Is This Answer Correct ?    19 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to debug failed assembly binds?

808


Explain me what is an anonymous method and how is it different from a lambda expression?

746


When we go for html server controls and when we go for web server controls?

799


What are the important components of .net?

781


Explain the purpose of Remoting in .NET?

866


Why inheritance is important?

780


How will you register com+ services?

1798


What is smart navigation in .net?

774


what is the default security setting in .net?

750


How does u handle this COM components developed in other programming languages in .NET?

1908


What is .net and .net framework?

833


What is Event - Delegate? clear syntax for writing a event delegate

1794


What is Polymorphism? How does VB.NET/C# achieve polymorphism?

2682


What's singleton activation mode in .net?

819


What is RCW (Run time Callable Wrappers)?

2161