M
mp
looking in help for InStr it appears to give me pages using
Microsoft.VisualBasic.Strings namespace
yet other pages appear to suggest InStr is in C#
from local help
C# syntax
public static int InStr(
string String1,
string String2,
CompareMethod Compare
)
but when i use InStr in code
//get comments from original line
private string GetCommentFromLine(string line)
{if (instr(line,";")>0 )
{...}
}
I get
Error 1 The name 'instr' does not exist in the current context
even after adding
using Microsoft.VisualBasic;
same error
and again after adding a reference to Microsoft.VisualBasic in the
references
same error
stumped
mark
Microsoft.VisualBasic.Strings namespace
yet other pages appear to suggest InStr is in C#
from local help
C# syntax
public static int InStr(
string String1,
string String2,
CompareMethod Compare
)
but when i use InStr in code
//get comments from original line
private string GetCommentFromLine(string line)
{if (instr(line,";")>0 )
{...}
}
I get
Error 1 The name 'instr' does not exist in the current context
even after adding
using Microsoft.VisualBasic;
same error
and again after adding a reference to Microsoft.VisualBasic in the
references
same error
stumped
mark