zoukankan      html  css  js  c++  java
  • struct 类型用法.

    struct 类型是一种值类型,通常用来封装小型相关变量组,例如,矩形的坐标或库存商品的特征。下面的示例显示了一个简单的结构声明。

    d.aspx

    统计信息: <br /><br />
    新闻数:<%= Sate.newsCount %><br />
    产品数:<%= Sate.proCount %><br />
    会员数:<%= Sate.memberCount %>


    d.aspx.cs

    protected Common.ResInfo Sate;
        protected void Page_Load(object sender, EventArgs e)
        {
            Sate.newsCount = 123240;
            Sate.proCount = 144441;
            Sate.memberCount = 222;
        }



    aa.cs
    public static class Common
    {
        public struct ResInfo
        {
            public int newsCount;
            public int proCount;
            public int memberCount;
        }
    }

  • 相关阅读:
    phpdocumentor生成代码注释文档(linux)
    phpstorm扩展
    es教程
    康威定律
    k8s
    tidb调研
    netty 在线教程
    McQueenRPC源码阅读
    DIY一些基于netty的开源框架
    性能测试
  • 原文地址:https://www.cnblogs.com/sontin/p/1929823.html
Copyright © 2011-2022 走看看