som more snippets from vs.net
onto invoke
This commit is contained in:
parent
984e63a7ee
commit
d956ce5c55
@ -90,7 +90,7 @@ snippet ?
|
||||
snippet do
|
||||
do {
|
||||
${0}
|
||||
} while (${1});
|
||||
} while (${1:True});
|
||||
# while loop
|
||||
snippet wh
|
||||
while (${1}) {
|
||||
@ -101,6 +101,10 @@ snippet for
|
||||
for (int ${1:i} = 0; $1 < ${2:count}; $1${3:++}) {
|
||||
${0}
|
||||
}
|
||||
snippet forr
|
||||
for (int ${1:i} = ${2:length}; $1 >= 0; $1--) {
|
||||
${0}
|
||||
}
|
||||
# foreach
|
||||
snippet fore
|
||||
foreach (${1:var} ${2:entry} in ${3}) {
|
||||
@ -347,6 +351,11 @@ snippet struct
|
||||
}
|
||||
# enumeration
|
||||
snippet enum
|
||||
enum ${1} {
|
||||
${0}
|
||||
}
|
||||
|
||||
snippet enum+
|
||||
public enum ${1} {
|
||||
${0}
|
||||
}
|
||||
@ -372,3 +381,39 @@ snippet <rem
|
||||
<remarks>${1}</remarks>
|
||||
snippet <c
|
||||
<code>${1}</code>
|
||||
|
||||
snippet cw
|
||||
Console.WriteLine(${1});
|
||||
|
||||
# equals override
|
||||
snippet eq
|
||||
public override bool Equals(object obj){
|
||||
if (obj == null || GetType() != obj.GetType()){
|
||||
return false;
|
||||
}
|
||||
${0:throw new NotImplementedException();}
|
||||
return base.Equals(obj);
|
||||
}
|
||||
# exception snippet
|
||||
snippet exc
|
||||
public class ${1:MyException} : ${2:Exception}{
|
||||
public $1() { }
|
||||
public $1(string message) : base(message) { }
|
||||
public $1(string message, Exception inner) : base(message, inner) { }
|
||||
protected $1(
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context)
|
||||
: base(info, context) { }
|
||||
}
|
||||
# indexer snippet
|
||||
snippet index
|
||||
public ${1:object} this[${2:int} index]{
|
||||
get { ${3:} }
|
||||
set { ${0:} }
|
||||
}
|
||||
# eventhandler snippet
|
||||
snippet inv
|
||||
EventHandler temp = ${1:MyEvent};
|
||||
if (${2:temp} != null){
|
||||
$2();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user