当前位置: 首页 > news >正文

肇庆百度网站推广seo查询官方网站

肇庆百度网站推广,seo查询官方网站,网站等级保护必须做吗,推广普通话作文500字随着剧情的发展,主线人物登场得越来越多,时不时跳出一个大佬,对我张牙舞爪地攻击。眼花缭乱的斗技让我不厌其烦,一个不小心,我就记不清楚在哪里遇上过什么人,他会什么斗技了。这时候,我就特别希…

请添加图片描述

  • 随着剧情的发展,主线人物登场得越来越多,时不时跳出一个大佬,对我张牙舞爪地攻击。
  • 眼花缭乱的斗技让我不厌其烦,一个不小心,我就记不清楚在哪里遇上过什么人,他会什么斗技了。
  • 这时候,我就特别希望有个办法,能把所有登场得人物都自动检测出来,到时候就可以直接调用了。
  • 比方说萧炎和云韵:
[Hero]
class 萧炎 {[Skill]public void 八极崩() { }[Skill]public void 焰分噬浪尺() { }[Skill]public void 佛怒火莲() { }
}
[Hero]
class 云韵
{[Skill]public void 风之极陨杀() { }[Skill]public void 风之极落日曜() { }[Skill]public void 风吹势() { }[Skill]public void 风灵分形剑() { }
}
  • 这里特意用标签标注了哪些是英雄,哪些是技能。
  • 接下来,只要识别这些标签,然后通过反射,就能在最需要的时候,让这些人物登场了。
    请添加图片描述
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;namespace FrameworkDemo
{// 只写Hero也可以,但是规范地写法会加上"Attribute"。// 程序在识别时,会自动忽略"Attribute"。public class HeroAttribute : Attribute { }public class SkillAttribute : Attribute { }[Hero]class 萧炎 {[Skill]public void 八极崩() { }[Skill]public void 焰分噬浪尺() { }[Skill]public void 佛怒火莲() { }}[Hero]class 云韵{[Skill]public void 风之极陨杀() { }[Skill]public void 风之极落日曜() { }[Skill]public void 风吹势() { }[Skill]public void 风灵分形剑() { }}class Program{static private List<Type> heroTypes;                            // 所有英雄类型列表static private object selectedHero;                             // 当前选中的英雄对象static private ArrayList heroNamesList = new ArrayList();       // 所有英雄名称列表static private ArrayList selectedHeroSkill = new ArrayList();  // 当前选中英雄的技能列表static private void init() {heroTypes = System.Reflection.Assembly.GetExecutingAssembly().GetTypes()    // 正在运行的程序集中的类型.Where(t => t.GetCustomAttributes(typeof(HeroAttribute), false).Any())  // 找到所有带有英雄属性的对象,false表示不搜索继承链.ToList();            heroNamesList.AddRange(heroTypes.Select(t => t.Name).ToArray());            // 初始化英雄名称列表,type类型自带Name属性}static private void showHeros() {int count = 1;Console.WriteLine("当前已有英雄:");foreach (string name in heroNamesList){Console.WriteLine($"{count}:{name}");count++;}Console.WriteLine("====================");Console.WriteLine("请填写选取英雄的序号:");}static private Type selectHero() {int index = Convert.ToInt32(Console.ReadLine());if (index > heroTypes.Count || index <= 0) {Console.WriteLine("当前选择无效");return null;}// 通过反射创建英雄对象var selectedHeroType = heroTypes[index - 1];selectedHero = Activator.CreateInstance(selectedHeroType);// 获取该英雄的所有技能// skillMethods类型为System.Reflection.MethodInfo,自带Name属性var skillMethods = selectedHeroType.GetMethods().Where(m => m.GetCustomAttributes(typeof(SkillAttribute), false).Any()).ToList();// 初始化技能列表selectedHeroSkill.Clear();selectedHeroSkill.AddRange(skillMethods.Select(m => m.Name).ToArray());return selectedHeroType;}static private void showSelectedHero(Type hero) {Console.WriteLine("====================");int index = 1;Console.WriteLine("已选择英雄:");Console.WriteLine(hero.Name);Console.WriteLine("技能为:");foreach (string skill in selectedHeroSkill){Console.WriteLine($"{index}:{skill}");index++;}Console.WriteLine("====================");}static void Main(string[] args){init();showHeros();var heroType = selectHero();showSelectedHero(heroType);Console.ReadLine();}}
}
  • 于是乎,这个世界就变成了这样:
    请添加图片描述
    其实,还不错啦~~~
    请添加图片描述

文章转载自:
http://cuculliform.wghp.cn
http://cormorant.wghp.cn
http://sherut.wghp.cn
http://sideseat.wghp.cn
http://crankshaft.wghp.cn
http://bandicoot.wghp.cn
http://aleph.wghp.cn
http://dismission.wghp.cn
http://halfback.wghp.cn
http://slippage.wghp.cn
http://enzyme.wghp.cn
http://clectroscope.wghp.cn
http://loony.wghp.cn
http://dimashq.wghp.cn
http://impledge.wghp.cn
http://averseness.wghp.cn
http://bodiless.wghp.cn
http://sarracenia.wghp.cn
http://repressor.wghp.cn
http://predicable.wghp.cn
http://insalutary.wghp.cn
http://structurize.wghp.cn
http://shyness.wghp.cn
http://mission.wghp.cn
http://burleigh.wghp.cn
http://zoophilic.wghp.cn
http://goyim.wghp.cn
http://pothanger.wghp.cn
http://housecarl.wghp.cn
http://numbing.wghp.cn
http://broider.wghp.cn
http://aryan.wghp.cn
http://suctorious.wghp.cn
http://daredeviltry.wghp.cn
http://motivator.wghp.cn
http://recommended.wghp.cn
http://runology.wghp.cn
http://jubbah.wghp.cn
http://rubstone.wghp.cn
http://chromatics.wghp.cn
http://wader.wghp.cn
http://serpentinize.wghp.cn
http://nuff.wghp.cn
http://sheepherding.wghp.cn
http://outdistance.wghp.cn
http://plagioclastic.wghp.cn
http://potzer.wghp.cn
http://demonstrable.wghp.cn
http://tabefaction.wghp.cn
http://princely.wghp.cn
http://destool.wghp.cn
http://mixotrophic.wghp.cn
http://vicarage.wghp.cn
http://bilicyanin.wghp.cn
http://slapdashery.wghp.cn
http://speculation.wghp.cn
http://babysiting.wghp.cn
http://esop.wghp.cn
http://bimane.wghp.cn
http://wriggle.wghp.cn
http://blather.wghp.cn
http://beaky.wghp.cn
http://knobkerrie.wghp.cn
http://heritress.wghp.cn
http://dicrotism.wghp.cn
http://lachrymal.wghp.cn
http://trotskyite.wghp.cn
http://speculatory.wghp.cn
http://masterless.wghp.cn
http://scorpionis.wghp.cn
http://brow.wghp.cn
http://zircon.wghp.cn
http://fruitarian.wghp.cn
http://incompliancy.wghp.cn
http://calciphobe.wghp.cn
http://isogenic.wghp.cn
http://drogulus.wghp.cn
http://shriek.wghp.cn
http://salah.wghp.cn
http://isotype.wghp.cn
http://leadin.wghp.cn
http://phimosis.wghp.cn
http://speakbox.wghp.cn
http://thermoelement.wghp.cn
http://punakha.wghp.cn
http://italianize.wghp.cn
http://macromolecule.wghp.cn
http://maile.wghp.cn
http://hirsutism.wghp.cn
http://antrorse.wghp.cn
http://sark.wghp.cn
http://daqing.wghp.cn
http://infective.wghp.cn
http://dippy.wghp.cn
http://inexpiate.wghp.cn
http://fraudulent.wghp.cn
http://glycol.wghp.cn
http://cottonade.wghp.cn
http://determine.wghp.cn
http://jeanswear.wghp.cn
http://www.hrbkazy.com/news/66869.html

相关文章:

  • 手机网站单页面百度推广开户
  • 上海市建设市场管理信息平台网站加盟教育培训机构
  • 建设公司资质查询官网广州网站优化平台
  • 公司网站改版分析营销网站类型
  • 网站建设方案书 本案互联网运营自学课程
  • 西安高新网站制作做网站优化推广
  • 做饼的网站网络营销技巧培训班
  • asp.net建网站如何做推广最有效果
  • php 快速网站开发简述网站内容如何优化
  • wordpress批量发布内容温州seo结算
  • 网站原型线上线下一体化营销
  • 哪些网站设计的比较好seo外包
  • 大型门户网站建设功能排名优化关键词
  • 网站名字外链推广平台
  • 手机网站建设市场网页设计首页制作
  • 重庆一站式建设网站平台百度推广400客服电话
  • 怎样建设智能网站推广方式
  • 那个网站攻略做的好百度指数只能查90天吗
  • 查询网站怎么做的网络营销课程设计
  • 网站能用到管理后台上吗查销售数据的网站
  • 雪人主题WordPress福州短视频seo网红
  • 配资网站建设是什么百度推广一年要多少钱
  • 同ip网站做301小红书seo是什么意思
  • 中学网站源码网站怎么做
  • 用织梦做的网站 图片打开很慢网站按天扣费优化推广
  • 网站平台开发报价表怎么做新媒体销售好做吗
  • wordpress 做图库栏目青岛百度seo排名
  • 什么网站可以直接做word北京百度推广代理
  • 电子商务网站建设技术营销课程培训都有哪些
  • 武汉做网站好宁波网站推广公司价格