This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void DoSomething(int a, int b) | |
{ | |
//do something please | |
} | |
public void Apple(int a, int b) | |
{ | |
//This method also takes two int and returns void | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool ValidateCustomer(IValidateCustomer customer) | |
{ | |
//This method does not retun void and it does not take two ints | |
//So this MyDelegate cannot point to it. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.class public auto ansi sealed Learning.MyDelegate extends [mscorlib]System.MulticastDelegate | |
{ | |
// Methods | |
.method public hidebysig specialname rtspecialname | |
instance void .ctor ( | |
object 'object', | |
native int 'method' | |
) runtime managed | |
{ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DelegateLearning | |
{ | |
public delegate int MathematicalOperationDelegate(int x, int y); //declare | |
public enum MathematicalOperation | |
{ | |
Add, | |
Substract, | |
Multiply, | |
Divide |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { } | |
class Man Person { } | |
class Program | |
{ | |
// Define the delegate. | |
public delegate Person HandlerMethod(); | |
public delegate Person HandlerMehtod2(Man p); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\w+@\w+\.\w+(,\s*\w+@\w+\.\w+)* | |
from: https://dzone.com/articles/regular-expression-to-validate-a-comma-separated-l?edition=206671&utm_source=Daily%20Digest&utm_medium=email&utm_campaign=dd%202016-08-27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public delegate int MathOperationDelegate(int x, int y); | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
MathOperationDelegate operationDelegate = null; | |
//No need to create a seperate method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='container'> | |
<div class="row"> | |
<div class="col-md-4 epack"> | |
<h3>Header</h3> | |
</div> | |
<div class="col-md-4 success box-inset"> | |
<span class="green">Your data has been saved successfully!</span> | |
</div> | |
<div class="col-md-4 login"> | |
<h4>vishal anand</h4> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(720, 480); | |
strokeWeight(2); | |
ellipseMode(RADIUS); | |
} | |
function draw() { | |
background(204); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set runtimepath+=~/.vim | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => General | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Sets how many lines of history VIM has to remember | |
set history=500 | |
" Set to auto read when a file is changed from the outside | |
set autoread |
OlderNewer