Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C# Extension Method
//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; using System.Text; namespace Rextester { public class Program { public static void Main(string[] args) { var message="ajin ae"; //Your code goes here Console.WriteLine("The Result of the message is "+ message.ConvertToPascalCase()); } } public static class StringExtension { public static string ConvertToPascalCase(this string message) { string[] splittedProduct= message.Split(' '); var sb = new StringBuilder(); char[] splittedProductChars; foreach(var s in splittedProduct) { splittedProductChars= s.ToCharArray(); if(splittedProductChars[0] > 0) { splittedProductChars[0]=((new String(splittedProductChars[0],1)).ToUpper().ToCharArray())[0]; } sb.Append(new String(splittedProductChars)); sb.Append(" "); } return sb.ToString().TrimEnd(); } } }
run
|
edit
|
history
|
help
0
1
dsda
UINT32toHEX
sulu
Interlocked Class (atomic operations)
Prism area
Fibonacci recursion
SHA tester
Programa_01_01_Declaracion_de_clases
a