You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
492 B
C#
31 lines
492 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Study.DelegateSeries.Core
|
|
{
|
|
public delegate int mydelegate();
|
|
public class Demo
|
|
{
|
|
|
|
public int MyDemo(int b)
|
|
{
|
|
return b * b;
|
|
}
|
|
|
|
public int UseDelegate()
|
|
{
|
|
mydelegate d = delegate () { return 5; };
|
|
|
|
var total = MyDemo(d());
|
|
|
|
return total;
|
|
}
|
|
|
|
private void aa()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|