Skip to content

Instantly share code, notes, and snippets.

public abstract class ObservableBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
(function (window, $) {
// my javascript code goes here
})(window, jQuery);
(function (a, b) {
// variable a has value (1)
// variable b has value (2)
})(1, 2);
(function () {
var a = 10;
function functionOne() {
};
})();
var a = 10;
function functionOne() {
};
public class Person
{
}
public class Person
{
public string Name { get; set; }
public Person(string name)
{
this.Name = name;
}
}
public class Person
{
public Person() { }
}
private static string Format(Exception ex)
{
if (ex == null)
throw new ArgumentNullException("ex");
var baseException = ex.GetBaseException();
var builder = new StringBuilder();
builder
.AppendLine()
class Program
{
[DllImport("Kernel32")]
private static extern bool SetConsoleCtrlHandler(EventHandler handler, bool add);
private delegate bool EventHandler(CtrlType sig);
static EventHandler _handler;
enum CtrlType
{