Skip to content

Instantly share code, notes, and snippets.

View GuruLahima's full-sized avatar

Aleksandar Ruseski GuruLahima

View GitHub Profile
@shrinath-kopare
shrinath-kopare / ActionDemo.cs
Created June 5, 2018 14:03
Action, Delegate, Lambda expression and Callbacks in C#. I have created these scripts in Unity, so the only diff is that, starting point here is Start().
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class ActionDemo : MonoBehaviour {
void Start(){
Action<string> SampleAction; //action dont need an explicit delegate to be declared (Action is special kind of delegate which takes parameters but returns nothing)