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

推荐订阅源

GbyAI
GbyAI
Martin Fowler
Martin Fowler
云风的 BLOG
云风的 BLOG
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
小众软件
小众软件
博客园_首页
博客园 - 聂微东
罗磊的独立博客
Recent Announcements
Recent Announcements
U
Unit 42
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
Stack Overflow Blog
Stack Overflow Blog
博客园 - Franky
D
DataBreaches.Net
Last Week in AI
Last Week in AI

博客园 - 老保

不要把MASM32开发环境和MASM汇编器版本搞混了 python获取当前脚本所在目录 python迭代器 mysql 随记 c程序设计语言(第二版) 阅读笔记 九 unix系统IO c程序设计语言(第二版) 阅读笔记 八 文件 c程序设计语言(第二版) 阅读笔记 七 结构和联合 c程序设计语言(第二版) 阅读笔记 六 指针 c程序设计语言(第二版) 阅读笔记 五 变量作用域及变量声明和定义 c程序设计语言(第二版) 阅读笔记 四 函数定义域声明规则 c程序设计语言(第二版) 阅读笔记 三 ANSI C及较早版本函数声明 c程序设计语言(第二版) 阅读笔记 二 变量声明 extern c程序设计语言(第二版) 阅读笔记 一 特点和简介 XMLHttpRequest和W3C DOM备忘 socket 常用的数据结构备忘 笔试题目 NHibernate Configuration和Sessionfactory js常用函数 一个很简洁 效果很好的js效果 - 老保 - 博客园
c# 学习笔记1 (枚举和结构类型和数组)
老保 · 2007-12-17 · via 博客园 - 老保

using System; using System.Collections.Generic; using System.Text; using System.Data.SqlClient; namespace mylearn { enum orientation : byte { north=1, south=2, east=3, west=4 } struct route { public orientation myDirection; public double distance; } class Program { static void Main(string[] args) { byte derectionByte; string derectionString; orientation myorientation = orientation.north; Console.WriteLine("myDirection={0}",myorientation); derectionByte = (byte)myorientation; derectionString = Convert.ToString(myorientation); Console.WriteLine("byte equivalent={0}",derectionByte); Console.WriteLine("string equivlent={0}", derectionString); myorientation = (orientation)Enum.Parse(typeof(orientation), "south"); Console.WriteLine("new Direction={0}", myorientation); route myRoute; myRoute.myDirection = myorientation; myRoute.distance = 12.5; Console.WriteLine("***********************"); Console.WriteLine(myRoute.myDirection); Console.WriteLine(myRoute.distance); int[][] myint = {new int[]{1}, new int[]{1,2}, new int[]{1,2,3}}; Console.WriteLine(myint[2][2]); Console.ReadKey(); } } }