Dim i As String = "10.56"
Dim j As String
j = DirectCast(i, String)
Console.WriteLi ne(j)
OUTPUT- 10.56
I want to ask that i have used directcast in Right way. This ques tion is asked to me in interview. We can simply assign the value of i to j. Wats the use of then DirectCast Operator.
Dim j As String
j = DirectCast(i, String)
Console.WriteLi ne(j)
OUTPUT- 10.56
I want to ask that i have used directcast in Right way. This ques tion is asked to me in interview. We can simply assign the value of i to j. Wats the use of then DirectCast Operator.
Comment