harish reddy

harish reddy

  • 1.7k
  • 162
  • 14.8k

Position of a string

Jan 22 2018 6:41 AM
//Write a program in C# Sharp to search the position of a substring within a string. Not able to get the output and proceed further.... pls help
string sentence = Console.ReadLine();
foreach (string item in sentence)
int pos = 1;
Console.WriteLine("Enter the substring");
string substring = Console.ReadLine();
char[] substringchar = substring.ToCharArray();

Brought to you by:

Answers (1)