I need to convert the findWithinHorizon method to C#, is there anything equivalent to this?

Recommended Answers

All 4 Replies

Do you mean something like the Regex.Match() method? You intend to search a string for a pattern correct?

commented: Was looking into that. Yes, that's it. +7

I am taking input and using that in conjuction with Regex.Match("\[.*?\]", 4096));. Would that work? It works with the findWithinHorizon method in java. but getting error for c#.

That should work, assuming you wanted the second parameter to be the start point at which the pattern is matched.
Of course, in your post you have an extra ')' but I'm assuming that is a typo. What is the error?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.