A

abstract class

An abstract class is a class that must be inherited and have the methods overridden. It can not be instantiated. And at least one of the methods in the class is abstract.

Array, ArrayList, BitArray

An array is a collection of related instance either value or reference type. Array proceses an immutable structure in which the number of dimensions and size of the array are fixed at instantiation.
ArrayList is a dynamic array.  Elements can be added & removed from an ArrayList at the runtime.

Array.CopyTo(), Array.Clone()

CopyTo() method copies the elements into another existing array.
Clone() method returns a new array boject containning all the elements in the original array.
Both are shallow copy.
For value type, it is no differece,  a bit by bit copy of the fileds is performed, in stack.
For reference type:
Shallow copy:  -> the reference is copied but the referred object is not, therefore the original object and its clone refer to the same object.
Deep copy:  Both the reference and the referred object are copied.

as, is

"as" operator is used for casting of objects to a type or a class.
"is" operator is used to check the compatibility of an object with a given type and it returns the result as bool.

attribute

C# provides developers a way to define declarative tags on certain entities e.g. Class, method etc. are called attributes. The attribute's information can be retrieved at runtime using Reflection.

B

Boxing & Unboxing

Boxing:  Implicit conversion of a value type (int, char etc.) to a reference type (object), is known as Boxing. In boxing process, a value type is being allocated on the heap rather than the stack.
Unboxing:
Explicit conversion of same reference type (which is being created by boxing process); back to a value type is known as unboxing. In unboxing process, boxed value type is unboxed from the heap and assigned to a value type which is being allocated on the stack.

C

Class & Struct

1. Structs are value types, while Classes are reference types.
2. Structs cannot inherit.

Const  & Readonly

Const is declared and initialized at complile time. The value cannot be changed after wards.
Readonly variables will be initialized only from the static constructor of the class. Readonly is used when we want to assign the value at run-time.

Compare 

Value type:  Using == or != operator.
Reference type:  Other override "bool Equails(object obj)" method Or implement Icomparable interface
But string type is different. The compiler automatically compares the values instead of references when == or != operators are used on string types.   If want to compare reference only, it can be done as follows: If ((object)str1 == (object)str2) {};

D

delegate

A delegate object encapsulates a referecne to a method. Like a function point in C++.

multicast delegate

Multicasting is the ability to create an invocation list, or chain of methods that will be automatically called when a delegate is invoked.  Such a chain is easy to create by using "+=" operator to add methods to the chain. To remove a method, use "-=".  Multicasting should always retur a void type because the value retruned by the last method because the return value of the entire delegate invocation.

Debug & Trace

Using Debug class for debug builds, use Trace class for both debug and release builds.

Dispose & Finalize

Dispose is used to free un-managed resource like files, database connects etc, Finalize can be used to free un-managed resources in the destructor.
Dispose is explicitly called by user code and the class which is implementing dispose method. Finalize is called by GC and cannot be called by user code.
There is performance costs associated with Finalize method since it doesn't clean the memory immediately by GC

H

HashTable

A hashtable is a collection of key-value pairs. It allows one wirtting thread and multi-threads of reading.

G

GAC(Global Assembly Cache)

The GAC is the Global Assembly Cache. Shared assemblies reside in the GAC; this allows applications to share assemblies instead of having the assembly distributed with each application. Versioning allows multiple assembly versions to exist in the GAC—applications can specify version numbers in the config file. The gacutil command line tool is used to manage the GAC.

It is located at %winroot%\assembly        (Assembly a1 = Assembly.Load(assemlyName);)

R

reflection

Reflection is the ability to find the information about types contained in an assembly at runtime.

ref & out

An argurment pased as ref must be initialized before passing to the method where as out parameter needs not to be intialized before passing to a method

S

Stack

This is a collection that abstrcts LIFO data structure in which initial capacity is 32.

static

static class:  a static class can not be instantiated. We can access the members of a static calss by using the class name itself
static members:  The static member is callable on a class even when no instance of the class has been created.

string

string is immutable, so each time a string is changed, a new instance in memory is created.

StringBuilder

StringBuilder is more efficent in cases where there is a large amount of string manipulation.  It is mutable.

U

Unit test

Positive test cases ( correct input,  correct output)
Negative test cases ( broken or missing data, wrong input, proper handling)
Excpetion test cases ( exceptions are thrown and caught properly).

Using

The using block is used to obtain a resource and use it and then automatically dipose of when the execution block completed.

(C#) 基本概念一览表的更多相关文章

  1. CQRS与Event Sourcing之浅见

    引言 DDD是近年软件设计的热门.CQRS与Event Sourcing作为实施DDD的一种选择,也逐步进入人们的视野.围绕这两个主题,软件开发的大咖[Martin Fowler].[Greg You ...

  2. 网络基本概念备忘:MAC地址,端口,HTTP状态码

    MAC地址 英文MAC Address 英文全称: Media Access Control Address 别称:硬件位址 用途:定义网络设备位置 表示:十六进制数,6 Byte 特点:产品出产后M ...

  3. A股市场各行业龙头股一览表

    A股市场各行业龙头股一览表 一.指标股: 工商银行.中国银行.中国石化.中国国航.宝钢股份. 中国神华.建设银行.招商银行.华能国际.中国联通. 长江电力.中国人寿.中国石油 二.金融: 招商银行.浦 ...

  4. 关于Linux vi命令 vi命令一览表

    vi是所有UNIX系统都会提供的屏幕编辑器,它提供了一个视窗设备,通过它可以编辑文件.当然,对UNIX系统略有所知的人,或多或少都觉得vi超级难用,但vi是最基本的编辑器,学好了vi,以后在UNIX世 ...

  5. 知名IT企业待遇一览表

    115家IT公司待遇一览表       作者是西电通院2013届毕业硕士,依据今年找工作的情况以及身边同学的汇总,总结各大公司的待遇例如以下,吐血奉献,公司比較全.下面绝对是各大公司2013届校招的数 ...

  6. C#控件一览表

    C#控件一览表 .窗体 .常用属性 ()Name属性:用来获取或设置窗体的名称,在应用程序中可通过Name属性来引用窗体. () WindowState属性: 用来获取或设置窗体的窗口状态. 取值有三 ...

  7. visual studio开发工具的C#主流控件属性一览表

    visual studio开发工具的C#主流控件属性一览表 详细的介绍了各控制属性的详细中文介绍 C#控件及常用设计整理 1.窗体 1.常用属性 (1)Name属性:用来获取或设置窗体的名称,在应用程 ...

  8. C语言运算符优先级和结合性一览表

    所谓优先级就是当一个表达式中有多个运算符时,先计算谁,后计算谁.这个其实我们在小学学算术的时候就学过,如1+4÷2. 但是C语言中的运算符已经远不止四则运算中的加减乘除了,还有其他很多运算符.当它们出 ...

  9. 如何一步一步用DDD设计一个电商网站(一)—— 先理解核心概念

    一.前言     DDD(领域驱动设计)的一些介绍网上资料很多,这里就不继续描述了.自己使用领域驱动设计摸滚打爬也有2年多的时间,出于对知识的总结和分享,也是对自我理解的一个公开检验,介于博客园这个平 ...

随机推荐

  1. vuex是啥

    vuex是一个状态管理工具. vuex store与一个简单的全局变量的区别是: 1.vuex stores 是响应式的,当组件改变state时,它能响应并高效地更新state. 2.state不能被 ...

  2. csu 1809 Parenthesis

    题目见此 分析,把'('当成1, ')'当成-1, 计算前缀和sum. 记交换括号左边的序号为u, 右边为v,讨论左右括号: 1.s[u] == '(' && s[v] == ')' ...

  3. 通用的web系统数据导出功能设计实现(导出excel2003/2007 word pdf zip等)

    前言 我们在做web系统中,导出也是很常用的一个功能,如果每一个数据列表都要对应写一个导出的方法不太现实.现在就想设计一个共通的功能来实现这个导出. 需求分析 在开始之前我们先要明白我们要实现怎样一个 ...

  4. iOS开发UI篇—无限轮播(循环展示)

    iOS开发UI篇—无限轮播(循环展示) 一.简单说明 之前的程序还存在一个问题,那就是不能循环展示,因为plist文件中只有五个数组,因此第一个和最后一个之后就没有了,下面介绍处理这种循环展示问题的小 ...

  5. JavaWeb chapter 4 Servlet处理HTTP请求

    1.  GET/POST提交方法: 用户在网页上点击一个超链接:(get) 用户提交在网页上提交表单:(post或者get) 用户在浏览器地址栏输入URL地址并回车(get) 2.  默认情况下都是使 ...

  6. 黑客长期摇号不中"黑"掉北京小客车摇号网

    新闻链接:http://www.2cto.com/News/201310/248936.html 新闻时间:2013-10-11 新闻正文: 为发泄长期摇号不中的不满,同时也为自己研发的软件打广告,硕 ...

  7. Servlet路径跳转1---使用相对路径和绝对路径,在页面上调用servlet的路径写法(超链接的方式和表单的方式)

    课程1-13   http://www.imooc.com/video/5554 Servlet路径跳转: 绝对路径:放在任何地方都对的路径 相对路径:相对于当前资源的路径 index文件 加上/,表 ...

  8. android属性之excludeFromRecents -- clearTaskOnLaunch 隐身意图 启动activity

    这个可以  用android 任务中app 隐藏起来 android属性之clearTaskOnLaunch 此属性是 每次启动app时都会进入 根目录中      android:clearTask ...

  9. python leetcode 日记 --Contains Duplicate --217

    题目 Given an array of integers, find if the array contains any duplicates. Your function should retur ...

  10. python3 reqeuests给OSC全站用户刷积分

    严格来讲是给在OSC上贡献过内容的OSC用户刷积分. OSC很多操作都需要消耗积分,很多人给OSC贡献了内容, 但是却没有人点赞,所以有些人在OSC混了很多年也没有积分. 本文中使用到的工具有gifc ...