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

推荐订阅源

博客园_首页
Y
Y Combinator Blog
Engineering at Meta
Engineering at Meta
D
Docker
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
腾讯CDC
P
Proofpoint News Feed
A
About on SuperTechFans
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
MyScale Blog
MyScale Blog
博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
N
Netflix TechBlog - Medium
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - 老保

不要把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(); } } }