C # program to remove vowels from a String
using System ; using System . Text ; using System . Linq ; using System . Collections . Generic ; public class Test { static String remVowel ( String str ) { char [ ] vowels = { ' a ' , ' e ' , ' i ' , ' o ' , ' u ' , ' A ' , ' E ' , ' I ' , ' O ' , ' U ' } ; List < char > al = vowels . OfType < char > ( ) . ToList ( ) ; ; StringBuilder sb = new StringBuilder ( str ) ; for ( int i = 0 ; i < sb . Length ; i ++ ) { if ( al . Contains ( sb [ i ] ) ) { sb . Replace ( sb [ i ] . ToString ( ) , " " ) ; i -- ; } } return sb . ToString ( ) ; }