C # program to find the number of charters in the longest word in the sentence .
using System ; class GFG { static int LongestWordLength ( string str ) { String [ ] words = str . Split ( ' ▁ ' ) ; int length = 0 ; for ( int i = 0 ; i < words . Length ; i ++ ) { if ( length < words [ i ] . Length ) { length = words [ i ] . Length ; } } return length ; }