单项选择题

以下代码输出结果是()string str="abcd";int result=str.IndexOf("a");Console.WriteLine(result)

A.-1
B.0
C.1
D.代码编写有误,不能运行