I'm having difficulty with the following.
In VB.Net, I have the following line:
Dim intWidgetID As Integer = CType(Replace(strWidget, "portlet_", ""), Integer)
where strWidget = portlet_n
where n
can be any whole number, i.e.
portlet_5
I am trying to convert this code to C#, but I keep getting errors, I currently have this:
intTabID = Convert.ToInt32(Strings.Replace(strTabID, "tab_group_", ""));
which I got using an online converter
But it doesn't like Strings
So my question is, how to I replace part of a string, so intTabID
becomes 5
based on this example?
I've done a search for this, and found this link: C# Replace part of a string
Can this not be done without regular expressions in c#, so basically, I'm trying to produce code as similar as possible to the original vb.net example code.