private static void Introduction2() { var html = @"<hello description=""i'm runtime-attribute"" yuyu=""fatty liver"">Runtime-Tag</hello>"; var tag = Meow.Load(html) .Resolve <RuntimeTag>() .Single(); // hello var tagName = tag.TagName; // 'Runtime-Tag' var content = tag.Content; // 'i'm runtime-attribute' var description = tag.DynamicAttributes.Description; //Just for access attributes. dynamic attributes = tag; //'fatty liver' var yuyu = attributes.yuyu; Console.WriteLine(tagName); Console.WriteLine(content); Console.WriteLine(description); Console.WriteLine(yuyu); }
private static void Introduction1() { var html = @" <!Doctype html> <html> <head> <title>I am Viyrex.</title> </head> <body> <p class=""introduction"">I'm Viyrex, A student from Taiwan.<br>My motto is 'No pain, no gain'.<br>If you want to contact me , <a href=""https://github.com/0x0001F36D"">Here</a> is my Github page. Have fun coding! </p> </body> <html> "; var meow = Meow.Load(html); // 'I am Viyrex.' var title = meow.Resolve <Title>().Single().Content; // 'https://github.com/0x0001F36D' var github = meow.Resolve <A>().Single().Href; Console.WriteLine(title); Console.WriteLine(github); }
static void Main(string[] args) { Meow meow = new Meow(); Cat Ani = new Cat(meow); Ani.Meow(); Bark bark = new Bark(); Dog Mel = new Dog(bark); Mel.Bark(); }
public List <Meow> GetMockup() { var MyArray = new List <Meow>(); var meow1 = new Meow() { Name = "แมวพิมพ์", Age = 60, Sex = "Female" }; var meow2 = new Meow() { Name = "กังพิมพ์", Age = 30, Sex = "Male" }; var meow3 = new Meow() { Name = "Sakamoto", Age = 20, Sex = "Male" }; MyArray.Add(meow1); MyArray.Add(meow2); MyArray.Add(meow3); return(MyArray); }
static void Main(string[] args) { Flight flight = new Flight(); Run run = new Run(); Swimming swimming = new Swimming(); Meow meow = new Meow(); Сrack crack = new Сrack(); Twitter twitter = new Twitter(); List <IAnimal> list = new List <IAnimal>(); list.Add(new Cat <Run, Twitter>()); list.Add(new Herring <Swimming, Swimming>()); list.Add(new Sparrow <Run, Twitter>()); foreach (IAnimal rec in list) { try { rec.Motion(); } catch (BeingNotProperty ex) { log = LogManager.GetCurrentClassLogger(); log.Error("У данного существа нет такого свойства!" + rec.GetType().ToString(), ex); } try { rec.Vocalize(); } catch (BeingNotProperty ex) { log = LogManager.GetCurrentClassLogger(); log.Error("у данного существа нет такого свойства!" + rec.GetType().ToString(), ex); } } Console.ReadKey(); }
static void Main() { Console.WriteLine("Seasons\n"); for (Seasons s = Seasons.Season; s <= Seasons.Season3; s++) { Console.WriteLine(s); } Console.WriteLine("BRAT\n"); for (Brat b = Brat.brat; b <= Brat.brat4; b++) { Console.WriteLine(b); } for (Meow meow = Meow.meow; meow <= Meow.Meow; meow++) { Console.WriteLine(meow); } for (WOW WOW = WOW.WOW; WOW <= WOW.W0W; WOW++) { Console.WriteLine(WOW); } for (Groups group = Groups.PKS115; group <= Groups.PKS315; group++) { Console.WriteLine(group); } Test MyStruct_obj = new Test(); MyStruct_obj.a = 2; MyStruct_obj.p = 2.5; MyStruct_obj.b = 5; MyStruct_obj.Show(); }
void Start() { speakBehavior = new Meow(); moveBehavior = new Walk(); }
public Cat() { Sound = new Meow(); }