harish reddy

harish reddy

  • NA
  • 162
  • 33.5k

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)
{
Console.WriteLine(item);
}
int pos = 1;
Console.WriteLine("Enter the substring");
string substring = Console.ReadLine();
char[] substringchar = substring.ToCharArray();
 

Answers (1)