├── new
├── CanisLupus.cs
├── CanisLupusFamiliaris.cs
├── App.config
├── GranDanes.cs
├── Chihuahua.cs
├── Canis.cs
├── Zoo.sln
├── Properties
│ └── AssemblyInfo.cs
└── Program.cs
├── Attributes
├── Nokia3310.config
├── Smartphone.cs
├── Galaxy.cs
├── IPhone.cs
├── Nokia3310.cs
├── Attributes.sln
├── Properties
│ └── AssemblyInfo.cs
├── ValidCarrierAttribute.cs
├── Attributes.csproj
└── Program.cs
├── async
├── iOS
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── packages.config
│ ├── Entitlements.plist
│ ├── Main.cs
│ ├── AppDelegate.cs
│ ├── LaunchScreen.storyboard
│ └── Info.plist
├── Droid
│ ├── Resources
│ │ ├── drawable
│ │ │ └── icon.png
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ ├── layout
│ │ │ ├── Toolbar.axml
│ │ │ └── Tabbar.axml
│ │ ├── Resource.designer.cs
│ │ ├── values
│ │ │ └── styles.xml
│ │ └── AboutResources.txt
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── packages.config
│ ├── Assets
│ │ └── AboutAssets.txt
│ └── MainActivity.cs
└── Async.Movil
│ ├── packages.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── MainPage.xaml
│ └── MainPage.xaml.cs
├── MetodosTry
├── App.config
├── MetodosTry.sln
├── Properties
│ └── AssemblyInfo.cs
└── Program.cs
├── Resxs
├── App.config
├── Resxs.sln
├── Properties
│ └── AssemblyInfo.cs
└── Program.cs
├── espacios
├── App.config
├── Program.cs
└── Properties
│ └── AssemblyInfo.cs
├── Enums
├── Enums
│ ├── App.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Program.cs
└── Enums.sln
├── Operadores
├── App.config
├── Operadores.sln
├── Toy.cs
├── Properties
│ └── AssemblyInfo.cs
└── Bundle.cs
├── Reflexion
├── App.config
├── ValidCarrierAttribute.cs
├── Smartphone.cs
├── reflexion.sln
└── Properties
│ └── AssemblyInfo.cs
├── excepciones
├── App.config
├── Adulto.cs
├── Excepciones.sln
├── Properties
│ └── AssemblyInfo.cs
├── Program.cs
└── Excepciones.csproj
├── CortoCircuito
├── App.config
├── Cortocircuito.sln
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
└── Cortocircuito.csproj
├── ExtensionMethods
├── App.config
├── Program.cs
├── ExtensionMethods.sln
├── Properties
│ └── AssemblyInfo.cs
└── StringExtensions.cs
├── GenericMethods
├── App.config
├── Athlete.cs
├── FootballPlayer.cs
├── BaseballPlayer.cs
├── Team.cs
├── GenericMethods.sln
├── Properties
│ └── AssemblyInfo.cs
└── Program.cs
├── Usings
├── Usings
│ ├── App.config
│ ├── NoDesechable.cs
│ ├── Desechable.cs
│ ├── Homer.txt
│ └── Properties
│ │ └── AssemblyInfo.cs
└── Usings.sln
├── Generics
├── FootballPlayer.cs
├── BaseballPlayer.cs
├── Athlete.cs
├── Box.cs
├── Team.cs
├── BaseballTeam.cs
├── FootballTeam.cs
├── ComplexBox.cs
├── LimitedBox.cs
├── .gitignore
├── Generics.sln
├── Properties
│ └── AssemblyInfo.cs
├── Program.cs
└── Generics.csproj
├── directives
├── Directivas
│ ├── App.config
│ ├── Program.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
└── Directivas.sln
├── Parciales
├── CoreiOS.cs
├── CoreAndroid.cs
├── ProgramMethods.cs
├── Page.cs
├── Program.cs
├── Core.cs
├── Page.Designer.cs
├── Parciales.sln
├── Properties
│ └── AssemblyInfo.cs
└── Parciales.csproj
├── linq-en-c-sharp-2
├── LinqPost2
│ ├── Lecture.cs
│ ├── Teacher.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── LinqPost2.csproj
└── LinqPost2.sln
├── linq-en-c-sharp-3
├── LinqPost3
│ ├── Lecture.cs
│ ├── Teacher.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── LinqPost3.csproj
└── LinqPost3.sln
├── linq-en-c-sharp-4
├── NameEqualityComparer.cs
├── Persona.cs
├── Linq4.sln
├── Properties
│ └── AssemblyInfo.cs
└── Linq4.csproj
├── Casteo
├── Persona.cs
├── Casteo.sln
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── Unidades.cs
└── Casteo.csproj
├── DebuggingTips
├── TestClass.cs
├── Program.cs
├── DebuggingTips.sln
├── Properties
│ └── AssemblyInfo.cs
└── DebuggingTips.csproj
├── yield
├── NotSoRandom.cs
├── Yield.sln
├── Properties
│ └── AssemblyInfo.cs
└── Yield.csproj
├── events
├── .gitignore
├── Events.sln
└── events
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Generator.cs
│ ├── Program.cs
│ └── events.csproj
├── Methods
├── Program.cs
├── Methods.sln
├── Driver.cs
├── Properties
│ └── AssemblyInfo.cs
├── F1Car.cs
└── Methods.csproj
├── Tuples
├── Tuples.sln
├── Properties
│ └── AssemblyInfo.cs
└── Tuples.csproj
├── params
├── Params.sln
├── Properties
│ └── AssemblyInfo.cs
└── Params.csproj
├── ref-out
├── RefOut.sln
├── Sample.cs
├── Properties
│ └── AssemblyInfo.cs
├── Program.cs
└── RefOut.csproj
├── Indizadores
├── Indizadores.sln
├── Alphabet.cs
├── Properties
│ └── AssemblyInfo.cs
├── Toy.cs
├── Indexer.cs
├── Program.cs
├── Indizadores.csproj
└── Bundle.cs
├── StringFormat
├── StringFormat.sln
├── Properties
│ └── AssemblyInfo.cs
└── StringFormat.csproj
├── nullcoalescing
├── NullCoalescing.sln
├── Properties
│ └── AssemblyInfo.cs
├── Program.cs
└── NullCoalescing.csproj
├── inicializadores
├── Inicializadores.sln
├── Properties
│ └── AssemblyInfo.cs
├── Program.cs
└── Inicializadores.csproj
└── .gitattributes
/new/CanisLupus.cs:
--------------------------------------------------------------------------------
1 | namespace Zoo
2 | {
3 | public class CanisLupus : Canis
4 | {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/Attributes/Nokia3310.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/async/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/new/CanisLupusFamiliaris.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thatcsharpguy/aprende-c-sharp/master/new/CanisLupusFamiliaris.cs
--------------------------------------------------------------------------------
/async/Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thatcsharpguy/aprende-c-sharp/master/async/Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/async/Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thatcsharpguy/aprende-c-sharp/master/async/Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/async/Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thatcsharpguy/aprende-c-sharp/master/async/Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/async/Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thatcsharpguy/aprende-c-sharp/master/async/Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/async/iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Attributes/Smartphone.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Attributes
3 | {
4 | public class Smartphone
5 | {
6 | public string Carrier { get; set; }
7 | }
8 |
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/new/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MetodosTry/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Resxs/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/espacios/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Attributes/Galaxy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Attributes
3 | {
4 | public class Galaxy
5 | {
6 | [ValidCarrier("Vodafone,Movistar,Sprint")]
7 | public string Carrier { get; set; }
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/Enums/Enums/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Operadores/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Reflexion/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/excepciones/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CortoCircuito/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ExtensionMethods/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/GenericMethods/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Usings/Usings/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Generics/FootballPlayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class FootballPlayer : Athlete
5 | {
6 | public string Position { get; set; }
7 | public int Goals { get; set; }
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/directives/Directivas/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Attributes/IPhone.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Attributes
3 | {
4 | public class IPhone
5 | {
6 | [ValidCarrier("Vodafone,Telcel,AT&T", MultipleCarriers = true)]
7 | public string Carrier { get; set; }
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/Generics/BaseballPlayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class BaseballPlayer : Athlete
5 | {
6 | public string Position { get; set; }
7 | public int GamesStarted { get; set; }
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/async/iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Generics/Athlete.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class Athlete
5 | {
6 | public string Name { get; set; }
7 | public double Height { get; set; }
8 | public double Weight { get; set; }
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Parciales/CoreiOS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Parciales
4 | {
5 | public partial class Core
6 | {
7 | byte[] TakePhoto(string camera)
8 | {
9 | return new byte[0];
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/Parciales/CoreAndroid.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Parciales
4 | {
5 | public partial class Core
6 | {
7 | byte[] TakePhoto(int camera, string options)
8 | {
9 | return new byte[0];
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/Parciales/ProgramMethods.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Parciales
4 | {
5 | partial class Program
6 | {
7 | public static void Write(string line)
8 | {
9 | Console.WriteLine(line);
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-2/LinqPost2/Lecture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LinqPost2
4 | {
5 | public class Lecture
6 | {
7 | public int Id { get; set; }
8 |
9 | public int TeacherId { get; set; }
10 |
11 | public string Name { get; set; }
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/async/Async.Movil/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Generics/Box.cs:
--------------------------------------------------------------------------------
1 | public class Box
2 | {
3 | public T Content { get; private set; }
4 |
5 | public Box(T content)
6 | {
7 | Content = content;
8 | }
9 |
10 | public override string ToString()
11 | {
12 | return string.Format("[Box: Content={0}]", Content);
13 | }
14 | }
--------------------------------------------------------------------------------
/Generics/Team.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class Team where T : Athlete
5 | {
6 | public string CoachName { get; set; }
7 | public T[] Members { get; set; }
8 |
9 | public Team(int maxMembers)
10 | {
11 | Members = new T[maxMembers];
12 | }
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-3/LinqPost3/Lecture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LinqPost3
4 | {
5 | public class Lecture
6 | {
7 | public int Id { get; set; }
8 |
9 | public int TeacherId { get; set; }
10 |
11 | public string Level { get; set; }
12 |
13 | public string Name { get; set; }
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/Generics/BaseballTeam.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class BaseballTeam
5 | {
6 | public string CoachName { get; set; }
7 | public BaseballPlayer[] Members { get; set; }
8 |
9 | public BaseballTeam(int maxMembers)
10 | {
11 | Members = new BaseballPlayer[maxMembers];
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/Generics/FootballTeam.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class FootballTeam
5 | {
6 | public string CoachName { get; set; }
7 | public FootballPlayer[] Members { get; set; }
8 |
9 | public FootballTeam(int maxMembers)
10 | {
11 | Members = new FootballPlayer[maxMembers];
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/async/Async.Movil/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/async/Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-2/LinqPost2/Teacher.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LinqPost2
4 | {
5 | public class Teacher
6 | {
7 | public int Id { get; set; }
8 |
9 | public int Age { get; set; }
10 |
11 | public string GivenName { get; set; }
12 |
13 | public string LastName { get; set; }
14 |
15 | public string Email { get; set; }
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-3/LinqPost3/Teacher.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LinqPost3
4 | {
5 | public class Teacher
6 | {
7 | public int Id { get; set; }
8 |
9 | public int Age { get; set; }
10 |
11 | public string GivenName { get; set; }
12 |
13 | public string LastName { get; set; }
14 |
15 | public string Email { get; set; }
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/Generics/ComplexBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class ComplexBox
5 | {
6 | public Content1 C1 { get; set; }
7 | public Content2 C2 { get; set; }
8 | public T Item { get; set; }
9 |
10 | public ComplexBox(Content1 c1, Content2 c2)
11 | {
12 | C1 = c1;
13 | C2 = c2;
14 | }
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-4/NameEqualityComparer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Linq4
5 | {
6 | public class NameEqualityComparer : IEqualityComparer
7 | {
8 | public bool Equals(Persona x, Persona y) => x.Nombre.Equals(y.Nombre);
9 |
10 | public int GetHashCode(Persona obj) => obj.Nombre.GetHashCode();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Parciales/Page.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Parciales
4 | {
5 | public partial class Page
6 | {
7 | public Page()
8 | {
9 | InitializeComponent();
10 | Console.WriteLine(Control1);
11 | Console.WriteLine(Control2);
12 | Console.WriteLine(Control3);
13 | }
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/Reflexion/ValidCarrierAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Reflexion
8 | {
9 | [System.AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
10 | sealed class ValidCarrierAttribute : Attribute
11 | {
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GenericMethods/Athlete.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace GenericMethods
8 | {
9 | public class Athlete
10 | {
11 | public string Name { get; set; }
12 | public double Height { get; set; }
13 | public double Weight { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Generics/LimitedBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Generics
3 | {
4 | public class LimitedBox where T : struct
5 | {
6 | }
7 |
8 | public class LimitedBox
9 | where X0 : struct
10 | where X1 : IEquatable
11 | {
12 | }
13 |
14 | public class LimitedBox
15 | where T : struct
16 | where U : IEquatable
17 | where V : new()
18 | {
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/Parciales/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Parciales
4 | {
5 | partial class Program
6 | {
7 | public static void Main(string[] args)
8 | {
9 | Write(HelloWorldString);
10 | }
11 | }
12 |
13 | // Class constants
14 | partial class Program
15 | {
16 | private const string HelloWorldString = "Hola mundo!";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/new/GranDanes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Zoo
4 | {
5 | public class GranDanes : CanisLupusFamiliaris
6 | {
7 | public new void MoverOrejas()
8 | {
9 | Console.WriteLine("Mueve sus orejas gigantezcas");
10 | }
11 |
12 | public override void Ladrar()
13 | {
14 | Console.WriteLine("WOOF! WOOF!");
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/async/Droid/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/new/Chihuahua.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Zoo
4 | {
5 | public class Chihuahua : CanisLupusFamiliaris
6 | {
7 | public event EventHandler E;
8 |
9 | public void MoverOrejas()
10 | {
11 | Console.WriteLine("Mueve sus orejitas");
12 | }
13 |
14 | public void Ladrar()
15 | {
16 | Console.WriteLine("guau, guau");
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Casteo/Persona.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Casteo
3 | {
4 | public class Persona
5 | {
6 | public string Nombre { get; set; }
7 |
8 | public static explicit operator Persona(string nombre)
9 | {
10 | return new Persona();
11 | }
12 |
13 | public static implicit operator string(Persona p)
14 | {
15 | return p.Nombre;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DebuggingTips/TestClass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | namespace DebuggingTips
5 | {
6 | [DebuggerDisplay("Propiedad1: {Propiedad1}")]
7 | public class TestClass
8 | {
9 | public string Propiedad1 { get; set; }
10 | public int Propiedad2 { get; set; }
11 |
12 | //public override string ToString()
13 | //{
14 | // return string.Format("{0}: {1}", nameof(Propiedad1), Propiedad1);
15 | //}
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GenericMethods/FootballPlayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace GenericMethods
8 | {
9 | public class FootballPlayer : Athlete
10 | {
11 | public string Position { get; set; }
12 | public int Goals { get; set; }
13 |
14 | public override string ToString()
15 | {
16 | return "Hi, I'm " + Name + " and I play football";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/async/Droid/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/GenericMethods/BaseballPlayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace GenericMethods
8 | {
9 | public class BaseballPlayer :Athlete
10 | {
11 | public string Position { get; set; }
12 | public int GamesStarted { get; set; }
13 |
14 | public override string ToString()
15 | {
16 | return "Hi, I'm " + Name + " and I play baseball";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/async/iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace Async.Movil.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/excepciones/Adulto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Excepciones
3 | {
4 | public class Adulto
5 | {
6 | public Adulto()
7 | {
8 | }
9 |
10 | private int _numeroGatos;
11 | public int NumeroGatos
12 | {
13 | get { return _numeroGatos; }
14 | set
15 | {
16 | if (value > 4)
17 | throw new TienesMuchosGatosException(value);
18 | _numeroGatos = value;
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/new/Canis.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Text;
4 | using System.Threading.Tasks;
5 |
6 | namespace Zoo
7 | {
8 | ///
9 | /// Canis es un género de mamíferos placentarios de la familia Canidae,
10 | /// orden de los carnívoros, que incluye los perros, lobos, chacales, coyotes y dingos.
11 | ///
12 | public abstract class Canis
13 | {
14 | public string EstadoConservacion { get; set; }
15 | public string Especie { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/yield/NotSoRandom.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 |
5 | namespace Yield
6 | {
7 |
8 | public class NotSoRandom : IEnumerable
9 | {
10 | Random r = new Random();
11 |
12 | public IEnumerator GetEnumerator()
13 | {
14 | while (true)
15 | {
16 | Console.Write("G ");
17 | yield return r.Next();
18 | }
19 | }
20 |
21 | IEnumerator IEnumerable.GetEnumerator()
22 | {
23 | while (true)
24 | {
25 | yield return r.Next();
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Parciales/Core.cs:
--------------------------------------------------------------------------------
1 | #define __ANDROID__
2 | using System;
3 |
4 | namespace Parciales
5 | {
6 | public partial class Core
7 | {
8 | public Core()
9 | {
10 | #if __ANDROID__
11 | int camera = 0;
12 | string options = "";
13 | var photo = TakePhoto(camera, options);
14 | #elif __IOS__
15 | string camera = "";
16 | var photo = TakePhoto(camera);
17 | #endif
18 |
19 | int byteCount = photo.Length;
20 | }
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-4/Persona.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Linq4
3 | {
4 | public class Persona
5 | {
6 | public string Nombre { get; set; }
7 | public string Apellido { get; set; }
8 | public override string ToString() { return Apellido + ", " + Nombre; }
9 | public override bool Equals(object o)
10 | {
11 | var oth = o as Persona;
12 | if (oth != null)
13 | return oth.Apellido.Equals(Apellido);
14 | return false;
15 | }
16 |
17 | public override int GetHashCode()
18 | {
19 | return Apellido.GetHashCode();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Generics/.gitignore:
--------------------------------------------------------------------------------
1 | #Autosave files
2 | *~
3 |
4 | #build
5 | [Oo]bj/
6 | [Bb]in/
7 | packages/
8 | TestResults/
9 |
10 | # globs
11 | Makefile.in
12 | *.DS_Store
13 | *.sln.cache
14 | *.suo
15 | *.cache
16 | *.pidb
17 | *.userprefs
18 | *.usertasks
19 | config.log
20 | config.make
21 | config.status
22 | aclocal.m4
23 | install-sh
24 | autom4te.cache/
25 | *.user
26 | *.tar.gz
27 | tarballs/
28 | test-results/
29 | Thumbs.db
30 |
31 | #Mac bundle stuff
32 | *.dmg
33 | *.app
34 |
35 | #resharper
36 | *_Resharper.*
37 | *.Resharper
38 |
39 | #dotCover
40 | *.dotCover
41 |
--------------------------------------------------------------------------------
/events/.gitignore:
--------------------------------------------------------------------------------
1 | #Autosave files
2 | *~
3 |
4 | #build
5 | [Oo]bj/
6 | [Bb]in/
7 | packages/
8 | TestResults/
9 |
10 | # globs
11 | Makefile.in
12 | *.DS_Store
13 | *.sln.cache
14 | *.suo
15 | *.cache
16 | *.pidb
17 | *.userprefs
18 | *.usertasks
19 | config.log
20 | config.make
21 | config.status
22 | aclocal.m4
23 | install-sh
24 | autom4te.cache/
25 | *.user
26 | *.tar.gz
27 | tarballs/
28 | test-results/
29 | Thumbs.db
30 |
31 | #Mac bundle stuff
32 | *.dmg
33 | *.app
34 |
35 | #resharper
36 | *_Resharper.*
37 | *.Resharper
38 |
39 | #dotCover
40 | *.dotCover
41 |
--------------------------------------------------------------------------------
/async/Async.Movil/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace Async.Movil
4 | {
5 | public partial class App : Application
6 | {
7 | public App()
8 | {
9 | InitializeComponent();
10 |
11 | MainPage = new MainPage();
12 | }
13 |
14 | protected override void OnStart()
15 | {
16 | // Handle when your app starts
17 | }
18 |
19 | protected override void OnSleep()
20 | {
21 | // Handle when your app sleeps
22 | }
23 |
24 | protected override void OnResume()
25 | {
26 | // Handle when your app resumes
27 | }
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/async/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace Async.Movil.iOS
9 | {
10 | [Register("AppDelegate")]
11 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
12 | {
13 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
14 | {
15 | global::Xamarin.Forms.Forms.Init();
16 |
17 | LoadApplication(new App());
18 |
19 | return base.FinishedLaunching(app, options);
20 | }
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/DebuggingTips/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace DebuggingTips
4 | {
5 | class MainClass
6 | {
7 | public static void Main(string[] args)
8 | {
9 | #if DEBUG
10 | Console.WriteLine("Solo visible en modo debug, directiva: DEBUG");
11 | #endif
12 |
13 | var tc = new TestClass() { Propiedad1 = "Uno" };
14 | Console.WriteLine(tc + " // Console.WriteLine ");
15 | System.Diagnostics.Debug.WriteLine(tc + " // Debug.WriteLine ");
16 | System.Diagnostics.Debug.WriteLineIf(tc.Propiedad1.Equals("Dos"), tc);
17 |
18 | Console.WriteLine("Hello World!");
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GenericMethods/Team.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace GenericMethods
9 | {
10 | public class Team where T : Athlete
11 | {
12 | public int MaxPlayersOnField { get; private set; }
13 | public string CoachName { get; set; }
14 | public T[] Members { get; set; }
15 |
16 | public Team(int maxMembers, int maxPlayersOnField)
17 | {
18 | Members = new T[maxMembers];
19 | MaxPlayersOnField = maxPlayersOnField;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Attributes/Nokia3310.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.DataAnnotations;
3 | using System.Runtime.CompilerServices;
4 |
5 | namespace Attributes
6 | {
7 | [ObsoleteAttribute("Esta clase es obsoleta, prueba con iPhone 6 o Galaxy S6")]
8 | public class Nokia3310
9 | {
10 | [RangeAttribute(0.0,9990.99, ErrorMessage = "Wrong balance, must be between {1} and {2}")]
11 | public double Balance { get; set; }
12 |
13 | [Obsolete]
14 | public void Call(string number, [CallerMemberName]string whoIsCalling = null)
15 | {
16 | Console.WriteLine(whoIsCalling + " is calling " + number);
17 | }
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Methods/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Methods
4 | {
5 | class MainClass
6 | {
7 | public static void Main(string[] args)
8 | {
9 | var car = F1Car.GetDefaultCar();
10 |
11 | var schumacher = new Driver("Michael Schumacher" );
12 | car.ChangeDriver(schumacher);
13 |
14 | // car.StartEngine();
15 | var started = car.TryStartEngine();
16 |
17 | var toroRossoCar = new F1Car("Toro Rosso");
18 | var verstappen = new Driver("Max Emilian Verstappen");
19 | verstappen.SetCar(toroRossoCar);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Reflexion/Smartphone.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Reflexion
9 | {
10 | public class Smartphone
11 | {
12 | [Required]
13 | [ValidCarrier]
14 | [Display(Name ="Compañía")]
15 | public string Carrier { get; set; }
16 |
17 | [Display(Name = "Bloqueado")]
18 | public bool IsLocked { get; set; }
19 |
20 | [Display(Name = "Numero de contactos")]
21 | public int ContactCount { get; set; }
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Parciales/Page.Designer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Parciales
4 | {
5 | // This code was generated by a tool,
6 | // any changes made to this file will be discarded
7 |
8 | // Este código fue generado por una herramienta,
9 | // cualquier cambio hecho a este archivo será descartado
10 | public partial class Page
11 | {
12 | object Control1;
13 | object Control2;
14 | object Control3;
15 |
16 | void InitializeComponent()
17 | {
18 | Control1 = new object();
19 | Control2 = new object();
20 | Control3 = new object();
21 | }
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/Usings/Usings/NoDesechable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Usings
8 | {
9 | public class NoDesechable
10 | {
11 | public NoDesechable()
12 | {
13 | Console.WriteLine("Hello, NoDesechable.");
14 | }
15 |
16 | public void DoSomethingWithException()
17 | {
18 | throw new NotImplementedException();
19 | }
20 |
21 | public void DoSomething()
22 | {
23 | Console.WriteLine("NoDesechable is doing something");
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/async/Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/async/Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/ExtensionMethods/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Extensiones;
4 |
5 | namespace ExtensionMethods
6 | {
7 | class Program
8 | {
9 | static void Main(string[] args)
10 | {
11 | var secuencia = new int[] { 1, 2, 3, 4, 5, 6 };
12 | var resultado = Enumerable.Take(Enumerable.Where(secuencia, i => i % 2 == 0), 1);
13 | // var resultado = secuencia.Where(i => i % 2 == 0).Take(1);
14 |
15 | Console.WriteLine("Console.WriteLine();".Mountain());
16 | Console.WriteLine(StringExtensions.Mountain("Console.WriteLine();"));
17 |
18 | string n = null;
19 | Console.WriteLine("null = " + n.Mountain());
20 | Console.Read();
21 |
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Usings/Usings/Desechable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Usings
8 | {
9 | public class Desechable : IDisposable
10 | {
11 | public Desechable()
12 | {
13 | Console.WriteLine("Hello, Desechable.");
14 | }
15 |
16 | public void DoSomething()
17 | {
18 | Console.WriteLine("Desechable is doing something");
19 | }
20 |
21 | public void DoSomethingWithException()
22 | {
23 | throw new NotImplementedException();
24 | }
25 |
26 | public void Dispose()
27 | {
28 | Console.WriteLine("Bye bye, Desechable.");
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/yield/Yield.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yield", "Yield.csproj", "{EE398854-5258-41B0-9995-2DCEE5DB5BEF}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {EE398854-5258-41B0-9995-2DCEE5DB5BEF}.Debug|x86.ActiveCfg = Debug|x86
13 | {EE398854-5258-41B0-9995-2DCEE5DB5BEF}.Debug|x86.Build.0 = Debug|x86
14 | {EE398854-5258-41B0-9995-2DCEE5DB5BEF}.Release|x86.ActiveCfg = Release|x86
15 | {EE398854-5258-41B0-9995-2DCEE5DB5BEF}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Casteo/Casteo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Casteo", "Casteo.csproj", "{DEAC3E73-2341-4847-9989-D0F8E78D18EE}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DEAC3E73-2341-4847-9989-D0F8E78D18EE}.Debug|x86.ActiveCfg = Debug|x86
13 | {DEAC3E73-2341-4847-9989-D0F8E78D18EE}.Debug|x86.Build.0 = Debug|x86
14 | {DEAC3E73-2341-4847-9989-D0F8E78D18EE}.Release|x86.ActiveCfg = Release|x86
15 | {DEAC3E73-2341-4847-9989-D0F8E78D18EE}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Generics/Generics.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generics", "Generics.csproj", "{C5B3A1FF-297D-488E-94B2-73DD5916461C}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {C5B3A1FF-297D-488E-94B2-73DD5916461C}.Debug|x86.ActiveCfg = Debug|x86
13 | {C5B3A1FF-297D-488E-94B2-73DD5916461C}.Debug|x86.Build.0 = Debug|x86
14 | {C5B3A1FF-297D-488E-94B2-73DD5916461C}.Release|x86.ActiveCfg = Release|x86
15 | {C5B3A1FF-297D-488E-94B2-73DD5916461C}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/events/Events.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Events", "events\events.csproj", "{9A5746DB-8D9E-4926-87B6-6063D7CC5F9A}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {9A5746DB-8D9E-4926-87B6-6063D7CC5F9A}.Debug|x86.ActiveCfg = Debug|x86
13 | {9A5746DB-8D9E-4926-87B6-6063D7CC5F9A}.Debug|x86.Build.0 = Debug|x86
14 | {9A5746DB-8D9E-4926-87B6-6063D7CC5F9A}.Release|x86.ActiveCfg = Release|x86
15 | {9A5746DB-8D9E-4926-87B6-6063D7CC5F9A}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-4/Linq4.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Linq4", "Linq4.csproj", "{659C75E5-204A-4D63-8F4B-CFD3F74EDE50}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {659C75E5-204A-4D63-8F4B-CFD3F74EDE50}.Debug|x86.ActiveCfg = Debug|x86
13 | {659C75E5-204A-4D63-8F4B-CFD3F74EDE50}.Debug|x86.Build.0 = Debug|x86
14 | {659C75E5-204A-4D63-8F4B-CFD3F74EDE50}.Release|x86.ActiveCfg = Release|x86
15 | {659C75E5-204A-4D63-8F4B-CFD3F74EDE50}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Parciales/Parciales.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Parciales", "Parciales.csproj", "{5D359AD0-0F0A-46DE-AB2B-9C088973B4C2}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {5D359AD0-0F0A-46DE-AB2B-9C088973B4C2}.Debug|x86.ActiveCfg = Debug|x86
13 | {5D359AD0-0F0A-46DE-AB2B-9C088973B4C2}.Debug|x86.Build.0 = Debug|x86
14 | {5D359AD0-0F0A-46DE-AB2B-9C088973B4C2}.Release|x86.ActiveCfg = Release|x86
15 | {5D359AD0-0F0A-46DE-AB2B-9C088973B4C2}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Attributes/Attributes.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Attributes", "Attributes.csproj", "{A4E48A8A-EC85-4C13-A2EE-AC68A14CD305}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {A4E48A8A-EC85-4C13-A2EE-AC68A14CD305}.Debug|x86.ActiveCfg = Debug|x86
13 | {A4E48A8A-EC85-4C13-A2EE-AC68A14CD305}.Debug|x86.Build.0 = Debug|x86
14 | {A4E48A8A-EC85-4C13-A2EE-AC68A14CD305}.Release|x86.ActiveCfg = Release|x86
15 | {A4E48A8A-EC85-4C13-A2EE-AC68A14CD305}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Tuples/Tuples.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tuples", "Tuples.csproj", "{A78DB183-84AE-45D8-B3F6-C99EA3D9D954}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {A78DB183-84AE-45D8-B3F6-C99EA3D9D954}.Debug|x86.ActiveCfg = Debug|x86
13 | {A78DB183-84AE-45D8-B3F6-C99EA3D9D954}.Debug|x86.Build.0 = Debug|x86
14 | {A78DB183-84AE-45D8-B3F6-C99EA3D9D954}.Release|x86.ActiveCfg = Release|x86
15 | {A78DB183-84AE-45D8-B3F6-C99EA3D9D954}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/params/Params.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Params", "Params.csproj", "{7E6996EC-50D4-4EE4-B019-A593619AF613}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {7E6996EC-50D4-4EE4-B019-A593619AF613}.Debug|x86.ActiveCfg = Debug|x86
13 | {7E6996EC-50D4-4EE4-B019-A593619AF613}.Debug|x86.Build.0 = Debug|x86
14 | {7E6996EC-50D4-4EE4-B019-A593619AF613}.Release|x86.ActiveCfg = Release|x86
15 | {7E6996EC-50D4-4EE4-B019-A593619AF613}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/ref-out/RefOut.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RefOut", "RefOut.csproj", "{829D40DC-65E6-40AE-A052-95DF90D79E39}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {829D40DC-65E6-40AE-A052-95DF90D79E39}.Debug|x86.ActiveCfg = Debug|x86
13 | {829D40DC-65E6-40AE-A052-95DF90D79E39}.Debug|x86.Build.0 = Debug|x86
14 | {829D40DC-65E6-40AE-A052-95DF90D79E39}.Release|x86.ActiveCfg = Release|x86
15 | {829D40DC-65E6-40AE-A052-95DF90D79E39}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Indizadores/Indizadores.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Indizadores", "Indizadores.csproj", "{DD57398A-11D3-4BD7-B238-1082305A7A07}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DD57398A-11D3-4BD7-B238-1082305A7A07}.Debug|x86.ActiveCfg = Debug|x86
13 | {DD57398A-11D3-4BD7-B238-1082305A7A07}.Debug|x86.Build.0 = Debug|x86
14 | {DD57398A-11D3-4BD7-B238-1082305A7A07}.Release|x86.ActiveCfg = Release|x86
15 | {DD57398A-11D3-4BD7-B238-1082305A7A07}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Methods/Methods.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Methods", "Methods.csproj", "{4B33CEB0-2B40-461A-BDBE-C993A990752C}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {4B33CEB0-2B40-461A-BDBE-C993A990752C}.Debug|x86.ActiveCfg = Debug|x86
13 | {4B33CEB0-2B40-461A-BDBE-C993A990752C}.Debug|x86.Build.0 = Debug|x86
14 | {4B33CEB0-2B40-461A-BDBE-C993A990752C}.Release|x86.ActiveCfg = Release|x86
15 | {4B33CEB0-2B40-461A-BDBE-C993A990752C}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/StringFormat/StringFormat.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StringFormat", "StringFormat.csproj", "{58D89B2C-2AEB-44A4-A8F1-E7F45A9BE578}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {58D89B2C-2AEB-44A4-A8F1-E7F45A9BE578}.Debug|x86.ActiveCfg = Debug|x86
13 | {58D89B2C-2AEB-44A4-A8F1-E7F45A9BE578}.Debug|x86.Build.0 = Debug|x86
14 | {58D89B2C-2AEB-44A4-A8F1-E7F45A9BE578}.Release|x86.ActiveCfg = Release|x86
15 | {58D89B2C-2AEB-44A4-A8F1-E7F45A9BE578}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/ref-out/Sample.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace RefOut
4 | {
5 | public class Parametros
6 | {
7 | public void Swap(ref int a, ref int b)
8 | {
9 | int m = a;
10 | a = b;
11 | b = m;
12 | }
13 |
14 | public bool SumaMaxima(int a, int b, int max, out int resultado)
15 | {
16 | resultado = a + b;
17 | if (resultado >= max)
18 | {
19 | resultado = max;
20 | return true;
21 | }
22 | return false;
23 | }
24 |
25 | public string WeirdMethod(ref int a, ref int b, out int s, out int r)
26 | {
27 | s = a + b;
28 | r = a - b;
29 | return a.ToString() + " " + b.ToString();
30 | }
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/DebuggingTips/DebuggingTips.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DebuggingTips", "DebuggingTips.csproj", "{074BAB34-C720-4213-8894-D491825823B5}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {074BAB34-C720-4213-8894-D491825823B5}.Debug|x86.ActiveCfg = Debug|x86
13 | {074BAB34-C720-4213-8894-D491825823B5}.Debug|x86.Build.0 = Debug|x86
14 | {074BAB34-C720-4213-8894-D491825823B5}.Release|x86.ActiveCfg = Release|x86
15 | {074BAB34-C720-4213-8894-D491825823B5}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/nullcoalescing/NullCoalescing.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NullCoalescing", "NullCoalescing.csproj", "{2A57CFD2-3472-45E5-ACCE-6F5F3DDCDA84}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {2A57CFD2-3472-45E5-ACCE-6F5F3DDCDA84}.Debug|x86.ActiveCfg = Debug|x86
13 | {2A57CFD2-3472-45E5-ACCE-6F5F3DDCDA84}.Debug|x86.Build.0 = Debug|x86
14 | {2A57CFD2-3472-45E5-ACCE-6F5F3DDCDA84}.Release|x86.ActiveCfg = Release|x86
15 | {2A57CFD2-3472-45E5-ACCE-6F5F3DDCDA84}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/new/Zoo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zoo", "Zoo.csproj", "{11073888-B133-4586-A87B-A2AEBF61D905}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {11073888-B133-4586-A87B-A2AEBF61D905}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {11073888-B133-4586-A87B-A2AEBF61D905}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {11073888-B133-4586-A87B-A2AEBF61D905}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {11073888-B133-4586-A87B-A2AEBF61D905}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-2/LinqPost2.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqPost2", "LinqPost2\LinqPost2.csproj", "{2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Debug|x86.ActiveCfg = Debug|x86
13 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Debug|x86.Build.0 = Debug|x86
14 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Release|x86.ActiveCfg = Release|x86
15 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-3/LinqPost3.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqPost3", "LinqPost3\LinqPost3.csproj", "{2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Debug|x86.ActiveCfg = Debug|x86
13 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Debug|x86.Build.0 = Debug|x86
14 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Release|x86.ActiveCfg = Release|x86
15 | {2BEBFE6C-CDC5-481B-9DCE-5F6CFCA46991}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------
/Methods/Driver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Methods
4 | {
5 | public class Driver
6 | {
7 | public Driver(string name)
8 | {
9 | Name = name;
10 | }
11 |
12 | public string Name { get; private set; }
13 |
14 | public string DrivesFor { get; set; }
15 |
16 | public void SetCar(F1Car car)
17 | {
18 | DrivesFor = car.Team;
19 | car.ChangeDriver(this);
20 | }
21 |
22 | public override bool Equals(object obj)
23 | {
24 | var p = obj as Driver;
25 | if (p != null)
26 | {
27 | return Name.Equals(p.Name);
28 | }
29 | return false;
30 | }
31 |
32 | public override int GetHashCode()
33 | {
34 | return Name.GetHashCode();
35 | }
36 | }
37 |
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/async/Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content;
5 | using Android.Content.PM;
6 | using Android.Runtime;
7 | using Android.Views;
8 | using Android.Widget;
9 | using Android.OS;
10 |
11 | namespace Async.Movil.Droid
12 | {
13 | [Activity(Label = "Async.Movil.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
14 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
15 | {
16 | protected override void OnCreate(Bundle bundle)
17 | {
18 | TabLayoutResource = Resource.Layout.Tabbar;
19 | ToolbarResource = Resource.Layout.Toolbar;
20 |
21 | base.OnCreate(bundle);
22 |
23 | global::Xamarin.Forms.Forms.Init(this, bundle);
24 |
25 | LoadApplication(new App());
26 | }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/Usings/Usings/Homer.txt:
--------------------------------------------------------------------------------
1 | ,---.
2 | ,.'-. \
3 | ( ( ,'"""""-.
4 | `,X `.
5 | /` ` `._
6 | ( , ,_\
7 | | ,---.,'o `.
8 | | / o \ )
9 | \ ,. ( .____,
10 | \| \ \____,' \
11 | '`'\ \ _,____,'
12 | \ ,-- ,-' \
13 | ( C ,' \
14 | `--' .' |
15 | | | .O |
16 | __| \ ,-'_
17 | / `L `._ _,' ' `.
18 | / `--.._ `',. _\ `
19 | `-. /\ | `. ( ,\ \
20 | _/ `-._ / \ |--' ( \
21 | ' `-. `' \/\`. `. )
22 | \ -hrr- \ `. | |
23 | From: http://chris.com/ascii/index.php?art=cartoons/simpsons
--------------------------------------------------------------------------------
/Indizadores/Alphabet.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Indizadores
5 | {
6 | public class Alphabet
7 | {
8 |
9 | public static Alphabet Cryllic = new Alphabet(
10 | 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ё', 'Ж', 'З', 'І', 'Й',
11 | 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ў',
12 | 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Ы', 'Ь', 'Э', 'Ю', 'Я');
13 |
14 | public static Alphabet Greek = new Alphabet(
15 | 'Α', 'Β', 'Γ', 'Δ', 'Ε', 'Ζ', 'Η', 'Θ', 'Ι', 'Κ', 'Λ',
16 | 'Μ', 'Ν', 'Ξ', 'Ο', 'Π', 'Ρ', 'Σ', 'Τ', 'Υ', 'Φ', 'Χ',
17 | 'Ψ', 'Ω');
18 |
19 | List caracteres;
20 | private Alphabet(params char[] caracteres)
21 | {
22 | this.caracteres = new List(caracteres);
23 | }
24 |
25 | public char CharacterAt(int i)
26 | {
27 | return caracteres[i];
28 | }
29 |
30 | public char this[int i]
31 | {
32 | get { return caracteres[i]; }
33 | }
34 |
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Resxs/Resxs.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resxs", "Resxs.csproj", "{D4F95258-6C59-4F09-AB6D-96D44FD9AB2C}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D4F95258-6C59-4F09-AB6D-96D44FD9AB2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D4F95258-6C59-4F09-AB6D-96D44FD9AB2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D4F95258-6C59-4F09-AB6D-96D44FD9AB2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D4F95258-6C59-4F09-AB6D-96D44FD9AB2C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Enums/Enums.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Enums", "Enums\Enums.csproj", "{00084C38-EC5B-4B82-91A3-4E8A4C7C108A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {00084C38-EC5B-4B82-91A3-4E8A4C7C108A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {00084C38-EC5B-4B82-91A3-4E8A4C7C108A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {00084C38-EC5B-4B82-91A3-4E8A4C7C108A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {00084C38-EC5B-4B82-91A3-4E8A4C7C108A}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Usings/Usings.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Usings", "Usings\Usings.csproj", "{354A18C2-A61B-4FCA-A3A1-B056DC3BEBBE}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {354A18C2-A61B-4FCA-A3A1-B056DC3BEBBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {354A18C2-A61B-4FCA-A3A1-B056DC3BEBBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {354A18C2-A61B-4FCA-A3A1-B056DC3BEBBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {354A18C2-A61B-4FCA-A3A1-B056DC3BEBBE}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Reflexion/reflexion.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reflexion", "Reflexion.csproj", "{678DDB7F-3B71-4733-8505-899B828E87CD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {678DDB7F-3B71-4733-8505-899B828E87CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {678DDB7F-3B71-4733-8505-899B828E87CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {678DDB7F-3B71-4733-8505-899B828E87CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {678DDB7F-3B71-4733-8505-899B828E87CD}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/MetodosTry/MetodosTry.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetodosTry", "MetodosTry.csproj", "{19E871DA-090E-4826-AC6C-1CC214469F8B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {19E871DA-090E-4826-AC6C-1CC214469F8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {19E871DA-090E-4826-AC6C-1CC214469F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {19E871DA-090E-4826-AC6C-1CC214469F8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {19E871DA-090E-4826-AC6C-1CC214469F8B}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Operadores/Operadores.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Operadores", "Operadores.csproj", "{7E20C786-A1E2-4BF1-94B4-7A5706EC257A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {7E20C786-A1E2-4BF1-94B4-7A5706EC257A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {7E20C786-A1E2-4BF1-94B4-7A5706EC257A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {7E20C786-A1E2-4BF1-94B4-7A5706EC257A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {7E20C786-A1E2-4BF1-94B4-7A5706EC257A}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/excepciones/Excepciones.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Excepciones", "Excepciones.csproj", "{2546DCE4-FEE0-4542-AE8A-A75D4ECCFD5F}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {2546DCE4-FEE0-4542-AE8A-A75D4ECCFD5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {2546DCE4-FEE0-4542-AE8A-A75D4ECCFD5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {2546DCE4-FEE0-4542-AE8A-A75D4ECCFD5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {2546DCE4-FEE0-4542-AE8A-A75D4ECCFD5F}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/directives/Directivas.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Directivas", "Directivas\Directivas.csproj", "{1BE7F858-6406-46FD-BF8A-A4F464851763}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {1BE7F858-6406-46FD-BF8A-A4F464851763}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {1BE7F858-6406-46FD-BF8A-A4F464851763}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {1BE7F858-6406-46FD-BF8A-A4F464851763}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {1BE7F858-6406-46FD-BF8A-A4F464851763}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/CortoCircuito/Cortocircuito.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26403.7
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cortocircuito", "Cortocircuito.csproj", "{986A82BE-121F-40B5-8088-CFA63B8979BD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {986A82BE-121F-40B5-8088-CFA63B8979BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {986A82BE-121F-40B5-8088-CFA63B8979BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {986A82BE-121F-40B5-8088-CFA63B8979BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {986A82BE-121F-40B5-8088-CFA63B8979BD}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/GenericMethods/GenericMethods.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.24720.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenericMethods", "GenericMethods.csproj", "{79A3B89C-BAAF-4A23-87C1-8AE6178BB5E5}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {79A3B89C-BAAF-4A23-87C1-8AE6178BB5E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {79A3B89C-BAAF-4A23-87C1-8AE6178BB5E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {79A3B89C-BAAF-4A23-87C1-8AE6178BB5E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {79A3B89C-BAAF-4A23-87C1-8AE6178BB5E5}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Casteo/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Casteo
4 | {
5 | class MainClass
6 | {
7 | public static void Main(string[] args)
8 | {
9 | Persona p1 = new Persona { Nombre = "Antonio" };
10 | Persona p2 = (Persona)"Antonio";
11 | string nombreP2 = p2;
12 |
13 | var metro1 = new Metro(5);
14 | var yarda1 = new Yarda(5);
15 |
16 | Console.WriteLine(metro1);
17 | Console.WriteLine(yarda1);
18 |
19 |
20 | Metro metro2 = 10;
21 | Yarda yarda2 = 10;
22 |
23 | Console.WriteLine(metro2);
24 | Console.WriteLine(yarda2);
25 |
26 | Yarda yarda3 = (Yarda)metro2;
27 | Metro metro3 = (Metro)yarda2;
28 |
29 | Console.WriteLine(metro3);
30 | Console.WriteLine(yarda3);
31 |
32 | Metro metro4 = (Metro)yarda3;
33 | Yarda yarda4 = (Yarda)metro3;
34 |
35 | Console.WriteLine(metro4);
36 | Console.WriteLine(yarda4);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ExtensionMethods/ExtensionMethods.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtensionMethods", "ExtensionMethods.csproj", "{B69F5FC0-372E-4A36-A4B2-51010C0A1DBB}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {B69F5FC0-372E-4A36-A4B2-51010C0A1DBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {B69F5FC0-372E-4A36-A4B2-51010C0A1DBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {B69F5FC0-372E-4A36-A4B2-51010C0A1DBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {B69F5FC0-372E-4A36-A4B2-51010C0A1DBB}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/inicializadores/Inicializadores.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Inicializadores", "Inicializadores.csproj", "{6A895EA0-4036-48C3-92D2-8843A9A2B467}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {6A895EA0-4036-48C3-92D2-8843A9A2B467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {6A895EA0-4036-48C3-92D2-8843A9A2B467}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {6A895EA0-4036-48C3-92D2-8843A9A2B467}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {6A895EA0-4036-48C3-92D2-8843A9A2B467}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Casteo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Casteo")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/yield/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Yield")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/Methods/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Methods")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/Tuples/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Tuples")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/params/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Params")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/ref-out/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("RefOut")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/Generics/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Generics")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/Indizadores/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Indizadores")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/Parciales/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Parciales")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/StringFormat/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("StringFormat")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/events/events/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("events")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-4/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Linq4")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/Attributes/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Attributes")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/DebuggingTips/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("DebuggingTips")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/async/Async.Movil/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Async.Movil")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/nullcoalescing/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("NullCoalescing")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("fferegrino")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-2/LinqPost2/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle ("LinqPost2")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("fferegrino")]
13 | [assembly: AssemblyTrademark ("")]
14 | [assembly: AssemblyCulture ("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion ("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-3/LinqPost3/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle ("LinqPost2")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("fferegrino")]
13 | [assembly: AssemblyTrademark ("")]
14 | [assembly: AssemblyCulture ("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion ("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/async/Droid/Resources/Resource.designer.cs:
--------------------------------------------------------------------------------
1 | namespace Async.Movil.Droid
2 | {
3 |
4 |
5 | public partial class Resource
6 | {
7 |
8 | public partial class Attribute
9 | {
10 |
11 | private Attribute()
12 | {
13 | }
14 | }
15 |
16 | public partial class Drawable
17 | {
18 |
19 | // aapt resource value: 0x7f020000
20 | public const int icon = 2130837504;
21 |
22 | private Drawable()
23 | {
24 | }
25 | }
26 |
27 | public partial class Layout
28 | {
29 |
30 | // aapt resource value: 0x7f030000
31 | public const int Main = 2130903040;
32 |
33 | private Layout()
34 | {
35 | }
36 | }
37 |
38 | public partial class String
39 | {
40 |
41 | // aapt resource value: 0x7f040000
42 | public const int hello = 2130968576;
43 |
44 | // aapt resource value: 0x7f040001
45 | public const int app_name = 2130968577;
46 |
47 | private String()
48 | {
49 | }
50 | }
51 |
52 | public partial class Id
53 | {
54 |
55 | // aapt resource value: 0x7f050000
56 | public const int myButton = 2131034112;
57 |
58 | private Id()
59 | {
60 | }
61 | }
62 | }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/async/Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using Android.App;
4 |
5 | // Information about this assembly is defined by the following attributes.
6 | // Change them to the values specific to your project.
7 |
8 | [assembly: AssemblyTitle("Async.Movil.Droid")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("")]
13 | [assembly: AssemblyCopyright("fferegrino")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
20 |
21 | [assembly: AssemblyVersion("1.0.0")]
22 |
23 | // The following attributes are used to specify the signing key for the assembly,
24 | // if desired. See the Mono documentation for more information about signing.
25 |
26 | //[assembly: AssemblyDelaySign(false)]
27 | //[assembly: AssemblyKeyFile("")]
28 |
29 |
--------------------------------------------------------------------------------
/async/Async.Movil/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/espacios/Program.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | class MainClass
4 | {
5 | static void Main(string[] args)
6 | {
7 | OtraColeccion coleccion = new OtraColeccion();
8 | var lista = new List();
9 |
10 | That.C.Sharp.Guy.Dos dos;
11 | That.C.Sharp.Guy.Uno uno;
12 | That.C.Sharp.Guy.Tres tres;
13 |
14 | }
15 | }
16 |
17 | namespace That
18 | {
19 | namespace C
20 | {
21 | namespace Sharp
22 | {
23 | namespace Guy
24 | {
25 | public class Uno { }
26 | }
27 | }
28 | }
29 | }
30 |
31 | namespace That.C.Sharp.Guy
32 | {
33 | public class Dos { }
34 | }
35 |
36 | namespace That.C
37 | {
38 | namespace Sharp.Guy
39 | {
40 | public class Tres { }
41 | }
42 | }
43 |
44 | namespace System.Collections.Generic
45 | {
46 | public class OtraColeccion
47 | {
48 | }
49 | }
50 |
51 | namespace Spaceship
52 | {
53 | namespace System
54 | {
55 | public class Console
56 | {
57 | void TurnOn()
58 | {
59 | global::System.Console.WriteLine("La consola ha sido encendida");
60 | }
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/Attributes/ValidCarrierAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | namespace Attributes
6 | {
7 | [AttributeUsage(AttributeTargets.Property)]
8 | public class ValidCarrierAttribute : ValidationAttribute
9 | {
10 | private string[] _validCarriers;
11 |
12 | // Positional parameter vvvvvvvvvvvvv
13 | public ValidCarrierAttribute(string validCarriers)
14 | {
15 | _validCarriers = validCarriers.Split(',');
16 | }
17 |
18 | // Named parameter
19 | // vvvvvvvvvvvvvvvv
20 | public bool MultipleCarriers { get; set; }
21 |
22 | public override bool IsValid(object value)
23 | {
24 | var carriers = (value as string)?.Split(',');
25 | if (carriers == null || !carriers.Any())
26 | return false;
27 |
28 | var coincidences = carriers.Intersect(_validCarriers);
29 |
30 | if (coincidences.Count() > 1 && MultipleCarriers)
31 | {
32 | return true;
33 | }
34 | else if (coincidences.Count() > 1 && !MultipleCarriers)
35 | {
36 | return false;
37 | }
38 | else if (coincidences.Any())
39 | {
40 | return true;
41 | }
42 |
43 | return false;
44 | }
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/Methods/F1Car.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Methods
4 | {
5 | public class F1Car
6 | {
7 | public F1Car(string team)
8 | {
9 | Team = team;
10 | }
11 |
12 | public string Team { get; private set; }
13 |
14 | public bool IsRunning { get; private set; }
15 |
16 | internal static F1Car GetDefaultCar()
17 | {
18 | return new F1Car("Default");
19 | }
20 |
21 | public Driver Driver
22 | {
23 | get {return _currentDriver;}
24 | }
25 |
26 | private Driver _currentDriver;
27 | public void ChangeDriver(Driver newDriver)
28 | {
29 | if (!newDriver.Equals(_currentDriver))
30 | {
31 | _currentDriver = newDriver;
32 | }
33 | }
34 |
35 | void StartEngine()
36 | {
37 | IsRunning = true;
38 | }
39 |
40 | public bool TryStartEngine()
41 | {
42 | if (_currentDriver == null)
43 | {
44 | return false;
45 | }
46 | StartEngine();
47 | return true;
48 | }
49 |
50 | }
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/directives/Directivas/Program.cs:
--------------------------------------------------------------------------------
1 | #define HOLA
2 | #define mundo
3 | #define PIZZA
4 | #undef mundo
5 |
6 | using System;
7 |
8 | namespace Directivas
9 | {
10 | class Program
11 | {
12 | static void Main(string[] args)
13 | {
14 |
15 | #if HOLA && mundo
16 | Console.WriteLine("Hola mundo");
17 | #elif HOLA
18 | Console.WriteLine("Hola");
19 | #elif mundo
20 | Console.WriteLine("Hola");
21 | #else
22 | Console.WriteLine("...");
23 | #endif
24 |
25 | #if (HOLA || mundo) && PIZZA
26 | Console.WriteLine("Hola o mundo y ¡pizza!");
27 | #endif
28 |
29 | #if DEBUG
30 | Console.WriteLine("Hola amigo desarrollador");
31 | #endif
32 |
33 | #region Super bloque de código
34 | Console.WriteLine("Hola");
35 | #endregion
36 |
37 |
38 | Console.Read();
39 |
40 | #pragma warning disable 219
41 | int x = 0;
42 | #pragma warning restore
43 |
44 | return;
45 |
46 | #pragma warning disable 162,219
47 | int zero = 0;
48 | #pragma warning restore
49 |
50 | #pragma warning disable
51 | if (1 != null) ;
52 | #pragma warning restore
53 |
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Indizadores/Toy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | namespace Indizadores
5 | {
6 | public class Toy
7 | {
8 | public string Name { get; set; }
9 | public double Price { get; set; }
10 |
11 | public static bool operator <(Toy a, Toy b)
12 | {
13 | return a.Price < b.Price;
14 | }
15 |
16 | public static bool operator >(Toy a, Toy b)
17 | {
18 | return a.Price > b.Price;
19 | }
20 |
21 | //public static bool operator <(Toy a, double price)
22 | //{
23 | // return a.Price < price;
24 | //}
25 |
26 | //public static bool operator >(Toy a, double price)
27 | //{
28 | // return a.Price > price;
29 | //}
30 |
31 | public static bool operator ==(Toy a, Toy b)
32 | {
33 | return a.Price == b.Price;
34 | }
35 |
36 | public static bool operator !=(Toy a, Toy b)
37 | {
38 | return a.Price != b.Price;
39 | }
40 |
41 | public static bool operator >=(Toy a, Toy b)
42 | {
43 | return a == b || a > b;
44 | }
45 |
46 | public static bool operator <=(Toy a, Toy b)
47 | {
48 | return a == b || a < b;
49 | }
50 |
51 | public static Bundle operator +(Toy a, Toy b)
52 | {
53 | Bundle bundle = new Bundle(2);
54 | bundle.TryAddToy(a);
55 | bundle.TryAddToy(b);
56 | return bundle;
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/async/Async.Movil/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Xamarin.Forms;
4 |
5 | namespace Async.Movil
6 | {
7 | public partial class MainPage : ContentPage
8 | {
9 | public MainPage()
10 | {
11 | InitializeComponent();
12 |
13 | Padding = new Thickness(20,40);
14 |
15 | normalButton.Clicked += (svm, a) =>
16 | {
17 | PerformTask();
18 | };
19 |
20 | asyncButton.Clicked += async (sender, e) =>
21 | {
22 | await PerformTaskAsync();
23 | };
24 |
25 | int i = 0;
26 | countButton.Clicked += (sender, e) =>
27 | {
28 | countLabel.Text = (i++).ToString();
29 | };
30 | }
31 |
32 | public void PerformTask()
33 | {
34 | descLabel.Text = "Normal presionado";
35 | progressBar.Progress = 0;
36 | for (int i = 1; i <= 10; i++)
37 | {
38 | Task.Delay(TimeSpan.FromSeconds(1)).Wait();
39 | progressBar.Progress = (double)i / (double)10;
40 | secondsLabel.Text = i + " seg";
41 | }
42 | }
43 |
44 |
45 | public async Task PerformTaskAsync()
46 | {
47 | descLabel.Text = "Async presionado";
48 | progressBar.Progress = 0;
49 | for (int i = 1; i <= 10; i++)
50 | {
51 | await Task.Delay(TimeSpan.FromSeconds(1));
52 | progressBar.Progress = (double)i / (double)10;
53 | secondsLabel.Text = i + " seg";
54 | }
55 | }
56 | }
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/CortoCircuito/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Cortocircuito
8 | {
9 | class Program
10 | {
11 | static void Main(string[] args)
12 | {
13 | Console.WriteLine("Ifs");
14 | if (AlwaysFalse("If 1") && AlwaysTrue("If 1")) ;
15 | Console.WriteLine();
16 | if (AlwaysFalse("If 2") & AlwaysTrue("If 2")) ;
17 | Console.WriteLine();
18 | if (AlwaysTrue("If 3") || AlwaysTrue("If 3")) ;
19 | Console.WriteLine();
20 | if (AlwaysTrue("If 4") | AlwaysTrue("If 4")) ;
21 | Console.WriteLine();
22 | if (AlwaysTrue("If 5") | AlwaysTrue("If 5") && (AlwaysFalse("If 5") & AlwaysTrue("If 5")));
23 |
24 |
25 | Console.Read();
26 | }
27 |
28 | public static bool AlwaysTrue(string label = null)
29 | {
30 | if (!String.IsNullOrWhiteSpace(label))
31 | Console.Write(label + ": ");
32 | Console.WriteLine(true);
33 | return true;
34 | }
35 |
36 | public static bool AlwaysFalse(string label = null)
37 | {
38 | if(!String.IsNullOrWhiteSpace(label))
39 | Console.Write(label + ": ");
40 | Console.WriteLine(false);
41 | return false;
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Operadores/Toy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Operadores
8 | {
9 | public class Toy
10 | {
11 | public string Name { get; set; }
12 | public double Price { get; set; }
13 |
14 | public static bool operator <(Toy a, Toy b)
15 | {
16 | return a.Price < b.Price;
17 | }
18 |
19 | public static bool operator >(Toy a, Toy b)
20 | {
21 | return a.Price > b.Price;
22 | }
23 |
24 | //public static bool operator <(Toy a, double price)
25 | //{
26 | // return a.Price < price;
27 | //}
28 |
29 | //public static bool operator >(Toy a, double price)
30 | //{
31 | // return a.Price > price;
32 | //}
33 |
34 | public static bool operator ==(Toy a, Toy b)
35 | {
36 | return a.Price == b.Price;
37 | }
38 |
39 | public static bool operator !=(Toy a, Toy b)
40 | {
41 | return a.Price != b.Price;
42 | }
43 |
44 | public static bool operator >=(Toy a, Toy b)
45 | {
46 | return a == b || a > b;
47 | }
48 |
49 | public static bool operator <=(Toy a, Toy b)
50 | {
51 | return a == b || a < b;
52 | }
53 |
54 | public static Bundle operator +(Toy a, Toy b)
55 | {
56 | Bundle bundle = new Bundle(2);
57 | bundle.TryAddToy(a);
58 | bundle.TryAddToy(b);
59 | return bundle;
60 | }
61 |
62 |
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/Indizadores/Indexer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Indizadores
5 | {
6 | public class Indexer
7 | {
8 | public int get_this(string position)
9 | {
10 | return 0;
11 | }
12 |
13 | public int this[string position]
14 | {
15 | get
16 | {
17 | Console.WriteLine("Accediendo a {0}", position);
18 | return 0; // Importante regresar un dato
19 | }
20 | set
21 | {
22 | // value contiene el dato que se va a establecer
23 | Console.WriteLine("Estableciendo {0} en la posición {1}", value, position);
24 | }
25 | }
26 |
27 | public int Value { get; set; }
28 |
29 |
30 | public string this[Indexer indexer]
31 | {
32 | get { return indexer.ToString(); }
33 | }
34 |
35 |
36 | public Indexer this[double position]
37 | {
38 | set { Console.WriteLine("\"Insertando\" {1} en {0}", position, value); }
39 | }
40 |
41 | public string this[int i, bool b, double d]
42 | {
43 | get { return String.Format("I'm an indexer: {0} {1} {2}", i, b, d); }
44 | }
45 |
46 | Dictionary _indexers = new Dictionary();
47 |
48 | public Indexer this[int id]
49 | {
50 | get
51 | {
52 | if (_indexers.ContainsKey(id))
53 | {
54 | return _indexers[id];
55 | }
56 | return null;
57 | }
58 |
59 | set
60 | {
61 | if (!_indexers.ContainsKey(id))
62 | {
63 | _indexers.Add(id, value);
64 | }
65 | }
66 | }
67 |
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/async/Droid/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
24 |
27 |
28 |
--------------------------------------------------------------------------------
/ref-out/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace RefOut
4 | {
5 | class MainClass
6 | {
7 | public static void Main(string[] args)
8 | {
9 | var parametros = new Parametros();
10 | int a = 100, b = 5;
11 | Console.WriteLine("Valor de a:" + a + " - Valor de b:" + b);
12 | parametros.Swap(ref a, ref b);
13 | Console.WriteLine("Valor de a:" + a + " - Valor de b:" + b);
14 |
15 | int x, y;
16 | // parametros.Swap(ref x, ref y);
17 |
18 | int resSuma;
19 | var isResultOk = parametros.SumaMaxima(a, b, 100, out resSuma);
20 |
21 | if (isResultOk)
22 | Console.WriteLine("La suma excedió el valor máximo");
23 | else
24 | Console.WriteLine("El resultado de la suma es " + resSuma);
25 |
26 |
27 |
28 | string dec = "abcd";
29 | string dec2 = "555";
30 |
31 | decimal one;
32 | decimal two;
33 |
34 | if (Decimal.TryParse(dec, out one))
35 | Console.WriteLine("Convertí " + dec + " en " + one);
36 | else
37 | Console.WriteLine(dec + " no es convertible a decimal");
38 |
39 |
40 | if (Decimal.TryParse(dec2, out two))
41 | Console.WriteLine("Convertí " + dec2 + " en " + two);
42 | else
43 | Console.WriteLine(dec + " no es convertible a decimal");
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/MetodosTry/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 |
8 | [assembly: AssemblyTitle("MetodosTry")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MetodosTry")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 |
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 |
25 | [assembly: Guid("19e871da-090e-4826-ac6c-1cc214469f8b")]
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // [assembly: AssemblyVersion("1.0.*")]
37 |
38 | [assembly: AssemblyVersion("1.0.0.0")]
39 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/async/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/new/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Zoo")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Zoo")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("11073888-b133-4586-a87b-a2aebf61d905")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Indizadores/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Indizadores
5 | {
6 | class MainClass
7 | {
8 | public static void Main(string[] args)
9 | {
10 | var lista = new List() { 1,2,3,4, 5 };
11 |
12 | Console.WriteLine(String.Format("{0} {1} {2} {3} {4}",
13 | lista[0],
14 | lista[1],
15 | lista[2],
16 | lista[3],
17 | lista[4]));
18 | lista[0] = 9;
19 | lista[4] = 10;
20 |
21 | Console.WriteLine(String.Format("{0} {1} {2} {3} {4}",
22 | lista[0],
23 | lista[1],
24 | lista[2],
25 | lista[3],
26 | lista[4]));
27 |
28 | Dictionary numeros = new Dictionary
29 | {
30 | { "uno", 1 },
31 | { "dos", 2 },
32 | { "tres", 3 },
33 | { "cinco", 5 },
34 | { "cuatro", 4 }
35 | };
36 |
37 | Console.WriteLine(numeros["uno"]);
38 | Console.WriteLine(numeros["cinco"]);
39 |
40 | var indizador = new Indexer();
41 | var retorno = indizador["hola"];
42 | indizador["feliz"] = 2017;
43 | Console.WriteLine("Valor de retorno {0}", retorno);
44 |
45 | var otroIndizador = new Indexer();
46 | Console.WriteLine(indizador[otroIndizador]);
47 |
48 | indizador[123.456d] = otroIndizador;
49 |
50 | var resultado1 = indizador[10, false, 5];
51 | Console.WriteLine(resultado1);
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Resxs/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Resxs")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Resxs")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("d4f95258-6c59-4f09-ab6d-96d44fd9ab2c")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/espacios/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Espacios")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Espacios")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("76621fdb-01d1-41bb-a956-69f9a100375d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/excepciones/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Excepciones")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Excepciones")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("2546dce4-fee0-4542-ae8a-a75d4eccfd5f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Operadores/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Operadores")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Operadores")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("7e20c786-a1e2-4bf1-94b4-7a5706ec257a")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CortoCircuito/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Cortocircuito")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Cortocircuito")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("986a82be-121f-40b5-8088-cfa63b8979bd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/GenericMethods/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GenericMethods")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GenericMethods")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("79a3b89c-baaf-4a23-87c1-8ae6178bb5e5")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ExtensionMethods/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ExtensionMethods")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ExtensionMethods")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b69f5fc0-372e-4a36-a4b2-51010c0a1dbb")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/inicializadores/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Inicializadores")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Inicializadores")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("a4887dac-2bbe-4c5a-bec8-81610d89851d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/new/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Zoo
8 | {
9 | class Program
10 | {
11 | static void Main(string[] args)
12 | {
13 | Console.WriteLine("¡Perritos!");
14 |
15 | Console.WriteLine("Canis genérico:");
16 | CanisLupusFamiliaris canis = new CanisLupusFamiliaris();
17 | canis.Ladrar();
18 | canis.MoverOrejas();
19 | Console.WriteLine();
20 |
21 | Console.WriteLine("Chihuahua (Canis):");
22 | CanisLupusFamiliaris chihuahuaCanis = new Chihuahua();
23 | chihuahuaCanis.Ladrar();
24 | chihuahuaCanis.MoverOrejas();
25 | Console.WriteLine();
26 |
27 | Console.WriteLine("Chihuahua:");
28 | Chihuahua chihuahua = new Chihuahua();
29 | chihuahua.Ladrar();
30 | chihuahua.MoverOrejas();
31 | Console.WriteLine();
32 |
33 | Console.WriteLine("Gran danes (Canis):");
34 | CanisLupusFamiliaris granDanesCanis = new GranDanes();
35 | granDanesCanis.Ladrar();
36 | granDanesCanis.MoverOrejas();
37 | Console.WriteLine();
38 |
39 | Console.WriteLine("Gran danes:");
40 | GranDanes granDanes = new GranDanes();
41 | granDanes.Ladrar();
42 | granDanes.MoverOrejas();
43 | Console.WriteLine();
44 |
45 | Console.ReadLine();
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/async/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | Async
7 | CFBundleName
8 | Async
9 | CFBundleIdentifier
10 | com.thatcsharpguy.async
11 | CFBundleShortVersionString
12 | 1.0
13 | CFBundleVersion
14 | 1.0
15 | LSRequiresIPhoneOS
16 |
17 | MinimumOSVersion
18 | 8.0
19 | UIDeviceFamily
20 |
21 | 1
22 | 2
23 |
24 | UILaunchStoryboardName
25 | LaunchScreen
26 | UIRequiredDeviceCapabilities
27 |
28 | armv7
29 |
30 | UISupportedInterfaceOrientations
31 |
32 | UIInterfaceOrientationPortrait
33 | UIInterfaceOrientationLandscapeLeft
34 | UIInterfaceOrientationLandscapeRight
35 |
36 | UISupportedInterfaceOrientations~ipad
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationPortraitUpsideDown
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 |
43 | XSAppIconAssets
44 | Assets.xcassets/AppIcons.appiconset
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Enums/Enums/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // La información general de un ensamblado se controla mediante el siguiente
6 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información
7 | // asociada con un ensamblado.
8 | [assembly: AssemblyTitle("Enums")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Enums")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
18 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
19 | // COM, establezca el atributo ComVisible en true en este tipo.
20 | [assembly: ComVisible(false)]
21 |
22 | // El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
23 | [assembly: Guid("00084c38-ec5b-4b82-91a3-4e8a4c7c108a")]
24 |
25 | // La información de versión de un ensamblado consta de los cuatro valores siguientes:
26 | //
27 | // Versión principal
28 | // Versión secundaria
29 | // Número de compilación
30 | // Revisión
31 | //
32 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
33 | // mediante el carácter '*', como se muestra a continuación:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Reflexion/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // La información general de un ensamblado se controla mediante el siguiente
6 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información
7 | // asociada con un ensamblado.
8 | [assembly: AssemblyTitle("Reflexion")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Reflexion")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
18 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
19 | // COM, establezca el atributo ComVisible en true en este tipo.
20 | [assembly: ComVisible(false)]
21 |
22 | // El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
23 | [assembly: Guid("678ddb7f-3b71-4733-8505-899b828e87cd")]
24 |
25 | // La información de versión de un ensamblado consta de los cuatro valores siguientes:
26 | //
27 | // Versión principal
28 | // Versión secundaria
29 | // Número de compilación
30 | // Revisión
31 | //
32 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
33 | // mediante el carácter '*', como se muestra a continuación:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Usings/Usings/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // La información general de un ensamblado se controla mediante el siguiente
6 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información
7 | // asociada con un ensamblado.
8 | [assembly: AssemblyTitle("Usings")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Usings")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
18 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
19 | // COM, establezca el atributo ComVisible en true en este tipo.
20 | [assembly: ComVisible(false)]
21 |
22 | // El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
23 | [assembly: Guid("354a18c2-a61b-4fca-a3a1-b056dc3bebbe")]
24 |
25 | // La información de versión de un ensamblado consta de los cuatro valores siguientes:
26 | //
27 | // Versión principal
28 | // Versión secundaria
29 | // Número de compilación
30 | // Revisión
31 | //
32 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
33 | // mediante el carácter '*', como se muestra a continuación:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/directives/Directivas/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // La información general de un ensamblado se controla mediante el siguiente
6 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información
7 | // asociada con un ensamblado.
8 | [assembly: AssemblyTitle("Directivas")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Directivas")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
18 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
19 | // COM, establezca el atributo ComVisible en true en este tipo.
20 | [assembly: ComVisible(false)]
21 |
22 | // El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
23 | [assembly: Guid("1be7f858-6406-46fd-bf8a-a4f464851763")]
24 |
25 | // La información de versión de un ensamblado consta de los cuatro valores siguientes:
26 | //
27 | // Versión principal
28 | // Versión secundaria
29 | // Número de compilación
30 | // Revisión
31 | //
32 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
33 | // mediante el carácter '*', como se muestra a continuación:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/events/events/Generator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 |
5 | namespace Events
6 | {
7 |
8 |
9 | public class Generator
10 | {
11 |
12 | Random r;
13 |
14 | public bool IsRunning { get; private set; }
15 |
16 | public string Name { get; set; }
17 |
18 | public Generator(string name)
19 | {
20 | Name = name;
21 | r = new Random(name.GetHashCode());
22 | }
23 |
24 |
25 | public delegate void GeneratingNumberEventHandler(Generator sender);
26 |
27 | public event GeneratingNumberEventHandler GeneratingNumber;
28 |
29 | public event EventHandler GeneratingNumber1;
30 |
31 | public event EventHandler EvenNumberGenerated;
32 |
33 | public Action EvenNumberGeneratedAction;
34 |
35 | public void Start()
36 | {
37 | var t = new Thread(() =>
38 | {
39 | IsRunning = true;
40 | while (IsRunning)
41 | {
42 | Thread.Sleep(500);
43 |
44 | if (GeneratingNumber != null)
45 | {
46 | GeneratingNumber(this);
47 | }
48 |
49 | if (GeneratingNumber1 != null)
50 | {
51 | GeneratingNumber1(this, EventArgs.Empty);
52 | }
53 |
54 | var generated = r.Next();
55 |
56 | if (generated % 2 == 0)
57 | {
58 | if (EvenNumberGenerated != null)
59 | {
60 | EvenNumberGenerated(this, generated);
61 | }
62 |
63 | //if (EvenNumberGeneratedAction != null)
64 | //{
65 | // EvenNumberGeneratedAction(generated);
66 | //}
67 | }
68 | //Console.WriteLine(generated);
69 | }
70 | });
71 |
72 | t.Start();
73 | }
74 |
75 |
76 | public void Stop()
77 | {
78 | IsRunning = false;
79 | }
80 | }
81 | }
82 |
83 |
84 |
--------------------------------------------------------------------------------
/events/events/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Events
4 | {
5 | class MainClass
6 | {
7 | static Generator g;
8 |
9 | public static void Main(string[] args)
10 | {
11 | Console.WriteLine("Escribe un nombre y presiona enter");
12 | var name = Console.ReadLine();
13 |
14 | g = new Generator(name);
15 |
16 | g.GeneratingNumber += G_GeneratingNumber;
17 |
18 | g.GeneratingNumber1 += (sender, e) =>
19 | {
20 | var generador = sender as Generator;
21 | Console.WriteLine(generador.Name + " generará un número (EventHandler)");
22 | };
23 |
24 | g.EvenNumberGenerated += (sender, number) =>
25 | {
26 | Console.WriteLine("Se generó el número par: " + number + " (manejador 1)");
27 | };
28 |
29 | g.EvenNumberGenerated += G_EvenNumberGenerated;
30 |
31 | g.EvenNumberGeneratedAction += (obj) =>
32 | {
33 | Console.WriteLine("Se generó el número: " + obj + " (Action 1)");
34 | };
35 |
36 | //g.EvenNumberGenerated(5);
37 | g.EvenNumberGeneratedAction(3);
38 |
39 | //g.EvenNumberGenerated = null;
40 | g.EvenNumberGeneratedAction = null;
41 |
42 |
43 |
44 | g.Start();
45 |
46 | System.Threading.Thread.Sleep(TimeSpan.FromMinutes(1));
47 | }
48 |
49 | static void G_GeneratingNumber(Generator sender)
50 | {
51 | Console.WriteLine(sender.Name + " generará un número");
52 | }
53 |
54 | static void G_EvenNumberGenerated(object sender, int number)
55 | {
56 | Console.Write("Se generó el número par" + number + " (manejador 2)");
57 | if (number % 7 == 0)
58 | {
59 | Console.Write(" que además es múltiplo de 7, bye bye!");
60 | g.EvenNumberGenerated -= G_EvenNumberGenerated;
61 | }
62 | Console.WriteLine();
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Casteo/Unidades.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Casteo
3 | {
4 | public class Metro
5 | {
6 | public decimal Valor
7 | {
8 | get;
9 | private set;
10 | }
11 |
12 | public Metro(decimal valor)
13 | {
14 | Valor = valor;
15 | }
16 |
17 | public static implicit operator Metro(decimal d)
18 | {
19 | return new Metro(d);
20 | }
21 |
22 | public static explicit operator decimal(Metro m)
23 | {
24 | return m.Valor;
25 | }
26 |
27 | public static explicit operator Metro(Yarda m)
28 | {
29 | var metro = new Metro(m.Valor / 0.9144m);
30 | return metro;
31 | }
32 |
33 | public override string ToString()
34 | {
35 | return $"{Valor:0.000} metro(s)";
36 | }
37 | }
38 |
39 | public class Yarda
40 | {
41 | public decimal Valor
42 | {
43 | get;
44 | set;
45 | }
46 |
47 | public Yarda(decimal valor)
48 | {
49 | Valor = valor;
50 | }
51 |
52 | public static implicit operator Yarda(decimal d)
53 | {
54 | return new Yarda(d);
55 | }
56 |
57 | public static explicit operator decimal(Yarda m)
58 | {
59 | return m.Valor;
60 | }
61 |
62 | public static explicit operator Yarda(Metro m)
63 | {
64 | var yarda = new Yarda(m.Valor * 0.9144m);
65 | return yarda;
66 | }
67 |
68 | public override string ToString()
69 | {
70 | return $"{Valor:0.000} yarda(s)";
71 | }
72 |
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/StringFormat/StringFormat.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {58D89B2C-2AEB-44A4-A8F1-E7F45A9BE578}
7 | Exe
8 | StringFormat
9 | StringFormat
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | true
25 | bin\Release
26 | prompt
27 | 4
28 | true
29 | x86
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tuples/Tuples.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {A78DB183-84AE-45D8-B3F6-C99EA3D9D954}
7 | Exe
8 | Tuples
9 | Tuples
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | full
25 | true
26 | bin\Release
27 | prompt
28 | 4
29 | true
30 | x86
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/params/Params.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {7E6996EC-50D4-4EE4-B019-A593619AF613}
7 | Exe
8 | Params
9 | Params
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | full
25 | true
26 | bin\Release
27 | prompt
28 | 4
29 | true
30 | x86
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/yield/Yield.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {EE398854-5258-41B0-9995-2DCEE5DB5BEF}
7 | Exe
8 | Yield
9 | Yield
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | true
25 | bin\Release
26 | prompt
27 | 4
28 | true
29 | x86
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/events/events/events.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {9A5746DB-8D9E-4926-87B6-6063D7CC5F9A}
7 | Exe
8 | Events
9 | events
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | true
25 | bin\Release
26 | prompt
27 | 4
28 | true
29 | x86
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/DebuggingTips/DebuggingTips.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {074BAB34-C720-4213-8894-D491825823B5}
7 | Exe
8 | DebuggingTips
9 | DebuggingTips
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | true
25 | bin\Release
26 | prompt
27 | 4
28 | true
29 | x86
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/ref-out/RefOut.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {829D40DC-65E6-40AE-A052-95DF90D79E39}
7 | Exe
8 | RefOut
9 | RefOut
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | full
25 | true
26 | bin\Release
27 | prompt
28 | 4
29 | true
30 | x86
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Casteo/Casteo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {DEAC3E73-2341-4847-9989-D0F8E78D18EE}
7 | Exe
8 | Casteo
9 | Casteo
10 | v4.6.1
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | true
25 | bin\Release
26 | prompt
27 | 4
28 | true
29 | x86
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/linq-en-c-sharp-4/Linq4.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {659C75E5-204A-4D63-8F4B-CFD3F74EDE50}
7 | Exe
8 | Linq4
9 | Linq4
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 |
23 |
24 | true
25 | bin\Release
26 | prompt
27 | 4
28 | true
29 | x86
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/nullcoalescing/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | namespace NullCoalescing
6 | {
7 | class MainClass
8 | {
9 | public static void Main(string[] args)
10 | {
11 | string inputName = null;
12 |
13 | string personName;
14 | if (inputName == null)
15 | personName = "no name";
16 | else
17 | personName = inputName;
18 | Console.WriteLine(personName);
19 |
20 |
21 | inputName = null;
22 |
23 | personName = inputName == null ? "no name" : inputName;
24 | Console.WriteLine(personName);
25 |
26 |
27 | inputName = null;
28 |
29 | personName = inputName ?? "no name";
30 | Console.WriteLine(personName);
31 |
32 |
33 | // Encadenamiento
34 | inputName = null;
35 |
36 | personName = inputName ?? GetRandomName() ?? TryGetName() ?? "no name";
37 | Console.WriteLine(personName);
38 |
39 | int? teamAPoints = null;
40 | int? teamBPoints = 5;
41 |
42 | var difference = (teamAPoints ?? 0) - (teamBPoints ?? 0);
43 | Console.WriteLine("Difference " + difference);
44 |
45 | // Invalid:
46 |
47 | //var invalid = personName ?? teamAPoints;
48 |
49 | var randomOrNot = MainClass.Random?.Next(0, 10) ?? 0;
50 |
51 | }
52 |
53 | public static string TryGetName()
54 | {
55 | Console.WriteLine("Escribe el nombre");
56 | var line = Console.ReadLine();
57 | return String.IsNullOrWhiteSpace(line) ? null : line;
58 | }
59 |
60 | public static string GetRandomName()
61 | {
62 | if (DateTime.Now.Second % 5 == 0)
63 | return Guid.NewGuid().ToString().Substring(0, 4);
64 | else
65 | return null;
66 | }
67 |
68 | private static Random _random;
69 | public static Random Random
70 | {
71 | get
72 | {
73 | return _random ?? (_random = new Random(DateTime.Now.Second));
74 | }
75 | }
76 |
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/nullcoalescing/NullCoalescing.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | {2A57CFD2-3472-45E5-ACCE-6F5F3DDCDA84}
7 | Exe
8 | NullCoalescing
9 | NullCoalescing
10 | v4.5
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\Debug
17 | DEBUG;
18 | prompt
19 | 4
20 | true
21 | x86
22 | 6
23 |
24 |
25 | true
26 | bin\Release
27 | prompt
28 | 4
29 | true
30 | x86
31 | 6
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Generics/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Generics
4 | {
5 | class MainClass
6 | {
7 | public static void Main(string[] args)
8 | {
9 | var cajaDeEntero = new Box(5);
10 | var cajaDeString = new Box("Hola mundo");
11 |
12 | Console.WriteLine(cajaDeEntero.Content); // 5
13 | Console.WriteLine(cajaDeString.Content); // Hola mundo
14 |
15 | var cajaDeCajas = new Box>(cajaDeString);
16 | Console.WriteLine(cajaDeCajas); // [Box: Content=[Box: Content=Hola mundo]]
17 |
18 | var cajota = new ComplexBox(1, 2)
19 | {
20 | Item = 3
21 | };
22 |
23 | // var limitado = new LimitedBox(); // Error, string no es struct
24 | var limitado = new LimitedBox(); // OK, DateTime es struct
25 |
26 | // var limitado1 = new LimitedBox>(); // Error, Box no implementa IEquatable
27 | var limitado1= new LimitedBox(); // OK, string sí implementa IEquatable
28 |
29 | // var limitado2 = new LimitedBox(); // Error, el tipo string no tiene un constructor sin parámetros
30 | var limitado2 = new LimitedBox(); // OK, MainClass sí tiene un constructor sin parámetros
31 |
32 |
33 | // Ejemplo:
34 |
35 | // var vitesse = new FootballTeam(18);
36 | var vitesse = new Team(18);
37 | vitesse.Members[0] = new FootballPlayer { Name = "Alex Renato Ibarra Mina" };
38 |
39 | // var losAngeles = new BaseballTeam(25);
40 | var losAngeles = new Team(25);
41 | losAngeles.Members[0] = new BaseballPlayer { Name = "Julio César Urías" };
42 |
43 | // var equipoDeEnteros = new Team(10); // Error. Ni int
44 | // var otroEquipo = new Team