Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyClass
- {
- static void Main()
- {
- TwoClass one = new TwoClass("супер классный текст");
- Console.WriteLine(one);
- one.Insert(5, "NIKE");
- Console.WriteLine(one);
- }
- }
- class TwoClass
- {
- public string Text;
- public TwoClass(string txt)
- { Text = txt; }
- public void Insert(int n, string txt)
- {
- Text = Text.Insert(n, txt);
- }
- public override string ToString()
- {
- return Text;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement