Skip to main content

Hanspeter Helfer

Hanspeter Helfer's Public Library

  • _(dt_year)
  • note the use of '_' as the alias for the APPLY rowset.
  • Note that the APPLY operator only contains an expression that uses a column in the rowset and aliases the result.

1 more annotation...

  • Diff Commander allows you to compare more than two folders or zip-archives at a time.

  • Bei der Horizon Box ist dies nicht möglich.

  • operator==() on object types means reference equality. That is, a==b is true if and only if a and b reference the same object.
  • Object.ReferenceEquals() has the same effect
  • Object.Equals(a,b) is essentially the same as a.Equals(b), but it will not blow up if a is null.

1 more annotation...

  • private void OnButton1Click(object sender, EventArgs e) {  this.Hide();  var form2 = new Form2();  form2.Closed += (sender, args) => this.Close();  form2.Show(); }

    • typeof takes a type name (which you specify at compile time).
    • GetType gets the runtime type of an instance.
    • is returns true if an instance is in the inheritance tree.
    • typeof takes a type name (which you specify at compile time).
    • GetType gets the runtime type of an instance.
  • obj as Foo;

3 more annotations...

  • WebPage1 inherits from Page, and this one inherits also from
     Object, so if you test for (new WebPage1()).GetType() ==
     typeof(object) it'll return false because the types are diferent, but
     when you test using the IS operator it's true.
  • The types might be different, but IS checks if you can cast safely to
     this type.

  • It is best to avoid this if possible.
  • Enums are by default an int type
  • use memory equivalent to a byte. This can make classes more efficient and smaller.

1 more annotation...

  • Structs should be small (16k or less).
  • You should almost always use classes. 
  •   An individual instance of a struct will use less memory than the equivalent class but once you start building collections or passing them around, the value type semantics will kill you in terms of performance

2 more annotations...

  • Class are usually for large amounts of data, whereas structs are smaller, and often used when you want to group similar data together. Use a class when object identity is more important than value. Use a struct when the value contained by an instance is more important than instance identity.
  • cannot assign null to a struct variable, since structs are value type.
  • can be instantiated without using the new operator.

9 more annotations...

1 - 20 of 570 Next › Last »
20 items/page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo