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

What is SOAP? How you will do windows and forms authentication?

873


What is STA in .NET?

868


What is a metadata in .net?

808


What is difference between .net core and .net standard?

711


Explain the difference between public and static modifiers?

866


How will you load an assembly which is not referenced by current assembly?

780


What is garbage collection and how it works ?

843


What is close method? How its different from finalize and dispose?

782


What is interface and abstract class in .net?

804


Explain about the Common Language Runtime?

843


Difference between class and interface in .net?

805


What is the concept of inheritance and how it works in .net?

791


What is meant by globalization and localization?

814


Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?

745


How to implement getcommon method in class a? Are you seeing any problem in the implementation?

849