public static void DoIt(some args) { lock (items) { foreach (var item in items) { IFoo foo = item.IsAlive ? item.Target as IFoo : null; if (foo != null) { foo.Bar(some args); } } } }
static void Main(string[] args) { int i; int[] number = new int[10]; int[][] jagged = new int[3][]; for (i = 0; i < 10; i++) { number[i] = Convert.ToInt32(Console.ReadLine()); } Program p1 = new Program(); some s1 = new some(p1.evenodd); //for even_odd some s2 = new some(p1.prime); //for prime s1.BeginInvoke(number, jagged, null, null); s2.BeginInvoke(number, jagged, null, null); Console.Read(); }
//in you function you just dequeue a Socket and use it, after you are finished you enqueue it void CheckNetIP(some parameters...) {
public SomeService(some parameters) { //some init procedure }
// Constructor public APD(some parameters) { // Removed for clarity. }
public CurrentOrLegacySelector(some type that describe context)
public SomeService(some parameters) { }
public static functionA(this Mesh mesh, some other variable) {
public virtual void CheckCollision(some arguments) { // default collision check code }
public override void CheckCollision(some arguments) { // overriden collision check code }
private void Validate(some params or an instance of a model class)
Validate(some params or an instance of a model class);
public void DoSomething(some params or some instance of a model class)