using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sample { public class Sample010 { private SampleEx ex; public Sample010(SampleEx ex) { this.ex = ex; } public string GetPlainText() { return this.ex.text; } public string GetJsonText() { return this.ex.json; } } public class SampleEx { public string text; public string json; public SampleEx(string text) { this.text = text; this.json = "{\"text\" : \"" + text + "\"}"; } } }