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 class example | |
| { | |
| public void test(){ | |
| System.Console.WriteLine("i'm the firt example"); | |
| } | |
| } | |
| public class example_two{ | |
| private readonly example e; | |
| public example_two() |
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 class example | |
| { | |
| public void test(){ | |
| System.Console.WriteLine("i'm the first example"); | |
| } | |
| } | |
| public class example_two{ | |
| private readonly example e; |
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 interface IFood | |
| { | |
| void Prepare(); | |
| } | |
| } |
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 class Scrambled_eggs : IFood | |
| { | |
| public void Prepare() | |
| { | |
| Console.WriteLine("i'm preparing a Scrambled eggs"); | |
| } | |
| } |
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 class Omelette : IFood | |
| { | |
| public void Prepare() | |
| { | |
| Console.WriteLine("im preparing a Omelette"); | |
| } | |
| } |
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 class Chef | |
| { | |
| /// <summary> | |
| /// doing dependency injection in the constructor | |
| /// </summary> | |
| private readonly IFood food; | |
| public Chef(IFood food) | |
| { | |
| this.food = food; | |
| } |
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
| const isYourFriendHappy = true; | |
| const willGoingHisHome = new Promise((resolve, reject) => { | |
| if(isYourFriendHappy) | |
| { | |
| const goodDay = { | |
| games: 'enjoy good food' | |
| } |
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
| const isYourFriendHappy = true; | |
| const willGoingHisHome = new Promise((resolve, reject) => { | |
| if(isYourFriendHappy) | |
| { | |
| const goodDay = { | |
| games: 'enjoy good food' | |
| } |
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 Program | |
| { | |
| public delegate int MyPrimerDelegado(int a, int b); | |
| static void Main(string[] args) | |
| { | |
| MyPrimerDelegado del = Operaciones.Suma; // referenciando al metodo suma de la clase operaciones | |
| int suma = del(6, 8); | |
| del = Operaciones.Resta;// referenciando al metodo resta de clase operaciones | |
| int resta = del(5, 2); |
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 void CallBackTareaCompletada(string mensaje); | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| CalllingCallback callback = new CalllingCallback(); | |
| callback.Tarea("soy la tarea inicial"); | |
| callback.Call(); | |
| } |
OlderNewer