Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Strings in C# with some properties examples
//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) { //This is a substring example Console.WriteLine("THIS is Substring Example" + "\n"); string str = "Last night I dreamt of San Pedro"; Console.WriteLine(str); string substr = str.Substring(23); Console.WriteLine(substr + "\n"); //This is .Join Exapmle Console.WriteLine("THIS is .Join Example"+ "\n"); string[] starray =new string[]{"Down the way nights are dark", "And the sun shines daily on the mountain top", "I took a trip on a sailing ship", "And when I reached Jamaica", "I made a stop"}; string stri = String.Join("\n", starray); Console.WriteLine(stri + "\n"); //This is an example of string.Compare Console.WriteLine("This is .Compare example" +"\n"); string str1 = "This is test"; string str2 = "This is text"; if (String.Compare(str1, str2) == 0) { Console.WriteLine(str1 + " and " + str2 + " are equal."); } else { Console.WriteLine(str1 + " and " + str2 + " are not equal."); } } } }
run
|
edit
|
history
|
help
0
gggsggsgg
find maximum consecutive repeating character
Display the pattern like diamond by using c# for loop
CommandForce2
Chest Interaction Unity
Properties in Interfaces
SADCAX AAAA
a
Date Diff
Permutations of string