Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Create DataBindings
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string dataType = "string"; string baseString = "public {0} {1}\r\n\t\t {{\r\n\t\t\t\tget {{ return {2}; }}\r\n\t\t\t\tset\r\n\t\t\t\t{{\r\n\t\t\t\t\t {3} = value;\r\n\t\t\t\t\t NotifyPropertyChanged(\"{4}\");\r\n\t\t\t\t}}\r\n\t\t }}"; List<string> stringList = new List<string>() { "SelectedMilestone", "SelectedRepo", "SelectedOwner","SelectedDeveloper" }; foreach (string str in stringList) { string publicName = str; string privateName = str; privateName = privateName.Replace("Selected","_selected"); Console.WriteLine(string.Format(baseString, dataType,publicName,privateName,privateName,publicName)); } } } }
run
|
edit
|
history
|
help
0
DateTime Leap Day
monopoly11
New easy way to start lightweight threads
Root
30272 ProgramEX8 For&While
Why do my posts keep getting deleted?
Testing for Integers and Floats in a String
if Two Words Are Anagrams of Each Other
linq jean by Fausto
linq jean by Fausto