惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
WordPress大学
WordPress大学
小众软件
小众软件
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
A
About on SuperTechFans
月光博客
月光博客
F
Fortinet All Blogs
宝玉的分享
宝玉的分享
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
Jina AI
Jina AI
博客园 - 聂微东
Schneier on Security
Schneier on Security
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
Last Week in AI
Last Week in AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
Hacker News: Ask HN
Hacker News: Ask HN
B
Blog
aimingoo的专栏
aimingoo的专栏
P
Privacy International News Feed
Martin Fowler
Martin Fowler
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
NISL@THU
NISL@THU
Know Your Adversary
Know Your Adversary
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 叶小钗
N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
Stack Overflow Blog
Stack Overflow Blog
S
Security @ Cisco Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threatpost
IT之家
IT之家
B
Blog RSS Feed

博客园 - AlexCube

ILSpy --- baml反编译错误解决方案 Privacy Policy 小工具 --- 英文单词查询 Wave Generator 2.0.1 SQL Server Full Text Search WPF TreeView View Model Silverlight, WCF, Windows Authentication - AlexCube .Net 程序运行方式 如何查看Load Assembly 错误日志 License 收集 VLAN WPF 开源程序 .Net 中通过Reflection获得List成员类型 - AlexCube - 博客园 SQL Server 获取字符串的长度 SQL Server 查看 SQL 语句执行时间 WPF RichTextBox 控件 WPF Layout 如何获取正确的 AJAX Control Toolkit 客户端控件脚本 用户控件 vs 自定义控件
使用dynamic 类型动态调用方法
AlexCube · 2010-09-03 · via 博客园 - AlexCube

class Program
{
    static void Main(string[] args)
    {
        dynamic d = Activator.CreateInstance(typeof(DemoType));

        object o = d.ToString();

        Console.WriteLine(o);

        Console.WriteLine(d.Value);
    }
}


class DemoType
{
    public override string ToString()
    {
        return "Hello World";
    }


    public int Value
    {
        get
        {
            return 100;
        }
    }
}