C#学习笔记之二(stack, queue, string, HashTable,StringBuilder, Regular Expresstion)

Queue:
 Enqueue()
 Dequeue()
 Peek() //only get first element, not delete it
Stack:
 Count()
 Clear()
 Peek()
 Pop()
 Push()
 CopyTo(array, offset) //copy to array
Dictionary/Hashtable:
 Keys //colleation of Keys,
 Values //colleation of value
 Count()
 Clear()
 Contains() // is element in hashtable
 ContainsKey() // is Key in Hashtable
 Item() //Indexer for hashtable
 Add() // Add entry with Key/Value
 GetEnumerator() // creat and return a Enumator object
Strings:
  string
 Compare() Split()
 Concat() StartsWith()
 Equals() ToLower()/ToUpper()
 Insert() Trim() 
 Format()
 string.Compare(s1,s2); //case sensitive
 string.Compare(s1,s2, true) //case not sensitive
 string s3 = @"test / .net" 
 string s6 string.Copy(s5);
 string s7 = s6
 S7 == S6
 S7.Equals(s6)
 string.Equals(s7,s6)
 s7.Length
 s3.EndWith("Test")
 int offset = s3.indexOf("TEST") //first occurence
 string s10 = s3.Insert(offset, "DDD");
 string s11 = s3.Insert(s3.IndexOf("ddd"), "EEE");
 s12.Split(delimiters)
 Regex r = new Regex(" |,");
 foreach( string s in r.Split(s12)) {}
 StringBuilder
  StringBuilder sb = new StringBuild();
 Append()
 ToString()
 Regular Expresstions: 
 using System.Text.RegularExpressions;  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值