Вопрос

I'm converting Excel VBA to C# (using a VSTO project in Visual Studio .NET). The bellow code is puzzling me, since there are no similar function in C#.

result = Application.WorksheetFunction.Match(stringA, Range(stringB), 0)
If result = 0 Then DoStuff

How can I replicate the above functionality in C#? Thanks

Это было полезно?

Решение

Try this

result = Application.WorksheetFunction.Match(stringA, Range(stringB), 0);
if (iTemp_result == 0) 
{
    DoStuff();      
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top