Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Delegate-ModifyObject
//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 { delegate void f(); class Person { public string name; public Person(string name){ this.name = name; } public void modify(){ this.name = "modified"; } } public class Program { public static void Main(string[] args) { Person person = new Person("name"); Console.WriteLine("Name originallty is" + person.name); f f1; f1 = new f(person.modify); f1.Invoke(); Console.WriteLine("Name after is" + person.name); } } }
run
|
edit
|
history
|
help
0
3 numper
IEquatable revised book
Lesson 2-2
hello...
MVC Learning
octalofint
Octavia
StringCompare
CommandForce3
simultQ