Jim
Jim

Reputation: 2828

VBA Match to C#

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

Upvotes: 0

Views: 1089

Answers (1)

Learner
Learner

Reputation: 353

Try this

result = Application.WorksheetFunction.Match(stringA, Range(stringB), 0);
if (iTemp_result == 0) 
{
    DoStuff();      
}

Upvotes: 2

Related Questions