title: VB.Net, How to get the String Value
body: <p>Here is my function to normal string to alpha numeric for requirement</p>
  <pre><code>    Public Function ToModern(_cond$)
        Dim _A% = 0 : Dim _B% = 0, _C% = 0
        Dim _mdSt$ = &quot;&quot;
        _A% = _cond$.Count(Function(x) x = &quot;A&quot;)
        _B% = _cond$.Count(Function(x) x = &quot;B&quot;)
        _C% = _cond$.Count(Function(x) x = &quot;C&quot;)
        _mdSt = $&quot;{_A%}A{_B%}B{_C}C&quot;
  
       Return _mdSt$
     End Function
  </code></pre>
  <p>working fine and answer is</p>
  <pre><code>    Public Function Test()
         Trace.WriteLine(ToModern(&quot;AAABBBCCC&quot;)) '3A3B3C
         Trace.WriteLine(ToModern(&quot;CCCCBBBAAA&quot;)) '3A3B4C
         Trace.WriteLine(ToModern(&quot;BBAACCCC&quot;)) '2A2B4C
      End Function
  </code></pre>
  <p>ToModern(&quot;AAABBBCCC&quot;)) '3A3B3Cis correct but the second one want to like 3C3B3A instead the result how to achieve this</p>