This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Person | |
{ | |
private string name_; | |
private int age_; | |
private string address_; | |
public string Address | |
{ get { return address_; } | |
set { address_ = value;} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int Age | |
{ | |
get { return age_; } | |
set { | |
if (value > 0 && value < 120) | |
age_ = value; | |
} | |
} | |
public string Address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//To verify a seting | |
if (userType == "Admin") | |
{ | |
IsAdmin = true; | |
} | |
//Or To define a Process inside a function | |
if (process == "CreditExtension") | |
{ | |
calculateInterest = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Sample A | |
public enum UserType | |
{ | |
Admin, | |
User | |
} | |
//To verify a seting | |
if (userType == UserType.Admin) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class OperationName | |
{ | |
public const string CreditExtension = "Credit Extension" ; | |
public const string Payment = "Payment Made" ; | |
public const string SaleAsset = "Sale Assets" ; | |
} | |
//That way we can use them in the following way: | |
if (process == OperationName.CreditExtension) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Para verificar algun seting | |
if (tipoDeUsuario == "Admin") | |
{ | |
EsAdmin = true; | |
} | |
//O para definir un proceso dentro de una funcion | |
if (proceso == "ExtensionCredito") | |
{ | |
calcularInteres = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ejemplo A | |
public enum TipoUsuario | |
{ | |
Admin, | |
User | |
} | |
//Para verificar un seting | |
if (tipoUsuario == TipoUsuario.Admin) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Operacion | |
{ | |
public const string ExtensionCredito = "Extension de Credito" ; | |
public const string Pago = "Pago Hecho" ; | |
public const string VentaActivo = "Venta de Activos" ; | |
} | |
//Asi podemos usar la funcionalidad de esta manera: | |
if (proceso == Operacion.ExtensionCredito) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text; | |
using System.Net.Http; | |
using Newtonsoft.Json.Linq; | |
using Newtonsoft.Json; | |
namespace MyPaymentApp | |
{ | |
class Program | |
{ | |
static string securityCode = "dhacBUCadH9BpVcGluemGneEk3Fctc3jXawG2dba51K2xnlqOqyzVg=="; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets | |
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Unit Test Stub</Title> | |
<Description>Stub template for unit test</Description> | |
<Shortcut>uts</Shortcut> | |
</Header> | |
<Snippet> |
OlderNewer