How to create a function that can determine the longest substring distance between two of the same characters in any string. Ex: The longest distance in "meteor" is 1 (between the two e's). The longest distance in "abbba" is 3 (between the a's). Do not use any built-in .NET framework utilities

Hmmm, sounds like homework to me... Read the rules, and show some work before expecting any help.

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.