Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Finding a Substring in a Main String
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here // finding index of substrings in a string string myStr = "Hello, world!"; Console.WriteLine(myStr.IndexOf("ld")+"\n"); // returns index of the beginning of the substring Console.WriteLine(myStr.IndexOf("?")); // returns -1 when not found } } }
run
|
edit
|
history
|
help
0
Prime Number
Interface constraints in generics
Cs
Simple Selection Sort
What is the best way to iterate over a Dictionary in C#?
Par ou ímpar
30272 Ex if...
StackOverflow Generic
MVC Learning
type experriment