convert vb to C#?how Mid comes in C#? [Resolved]

Posted by Oswaldlily under ASP.NET on 12/28/2011 | Points: 10 | Views : 1245 | Status : [Member] | Replies : 1
I have VB code as
Mid(Replace(Replace(Name, ":", " "), "/", ""), 1, 31)

hw to convert to C#?

i dont know how Mid comes in C#




Responses

Posted by: Sksingh on: 12/28/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi,
Try this

string name= "something here : something here/ ";

string result = name.Replace(":", " ").Replace("/", "").Substring(1, 31);


Take proper input string name.

Regards,
Sunil

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response