Un metodo un po' più "sporco" ma più compatto:
.codice:Private Function conta(ByVal s As String, ByVal c As Char) As Integer Return s.Length-s.Replace(c.ToString(),"").Length End Function
Un metodo un po' più "sporco" ma più compatto:
.codice:Private Function conta(ByVal s As String, ByVal c As Char) As Integer Return s.Length-s.Replace(c.ToString(),"").Length End Function
Amaro C++, il gusto pieno dell'undefined behavior.