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

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - 思然

邮件带图片附件 - 思然 - 博客园 XML查找节点 - 思然 - 博客园 动态生成rdlc 报表(原创) 图片处理 - 思然 - 博客园 数据绑定及其他 - 思然 - 博客园 图片上传及网络相册功能 SQL Server 2005 Express 使用心得 - 思然 附加进程调试和存储过程调试 (转)DIV CSS布局教程:应用ul、li实现表格形式 用户控件的使用经验 缓存之缓存文件依赖及编程方式设置输出缓存过期 防刷新多次提交 添加div符号注意符号问题 Datalist调用本地文件绑定图片 用户控件-TreeView的用法 关于table控件的一个疑难问题(涉及循环) 关于javascript调用webservices的中文参数乱码的问题 服务器端和客户端清除TextBox控件的值 获取母版页的控件的方法
枚举的应用
思然 · 2008-06-13 · via 博客园 - 思然

 GetEmu(CustomerKind.Normal);  
public enum CustomerKind
    {
      Normal = 90,
      Vip = 80,
      SuperVip = 70,
      InActive = 100
    }
//一种是用来判断
 public void GetEmu(CustomerKind c)
    {
        switch (c)
        {
            case CustomerKind.Normal:
                Response.Write((int)CustomerKind.Normal);
                break;
            case CustomerKind.Vip:
                Response.Write((int)CustomerKind.Vip);
                break;
            default:
                Response.Write((int)CustomerKind.InActive);
                break;
        }
    }
//另一种是用来计算

  void bind()
    {
        if (Request.QueryString["id"] == null)
        {

           Response.Write(300/100 * (int)CustomerKind.Normal);
           Response.Write(CustomerKind.Normal);
        }
        else
        {
            Response.Write(CustomerKind.Vip);
            Response.Write(300 / 100 * (int)CustomerKind.Vip);
        }
    }

  void bind()
    {
        if (Request.QueryString["id"] == null)
        {

           Response.Write(300/100 * (int)CustomerKind.Normal);
           Response.Write(CustomerKind.Normal);
        }
        else
        {
            Response.Write(CustomerKind.Vip);
            Response.Write(300 / 100 * (int)CustomerKind.Vip);
        }
    }