2

Is there an framework supported way to generate 'a' or 'an' depending on the next word in C# (obviously for English)?

e.g.

var word = "stack";
Console.WriteLine( IndefiniteArticle( word ) + " " + word );
word = "overflow";
Console.WriteLine( IndefiniteArticle( word ) + " " + word );

to print

a stack
an overflow

Thanks Tymek

tymtam
  • 31,798
  • 8
  • 86
  • 126

0 Answers0