Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Articulo.Pregunta.R1520
- {
- public enum Autenticacion
- {
- FORMULARIO = 1,
- WINDOWS = 2,
- WEB = 3
- }
- public class StringEnumeracion
- {
- public static void Main()
- {
- // Por medio de GetName(Type, object):
- Autenticacion autFormulario = Autenticacion.FORMULARIO;
- string strAutFormulario = Enum.GetName(typeof(Autenticacion), autFormulario);
- Console.WriteLine ("\nGetName(Type, object): {0}\n", strAutFormulario);
- // Por medio de ToString():
- Console.WriteLine ("ToString(): {0}\n", autFormulario.ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement