Skip to content

Instantly share code, notes, and snippets.

(function (a, b) {
// variable a has value (1)
// variable b has value (2)
})(1, 2);
public class Person
{
public string Name { get; set; }
public Person(string name)
{
this.Name = name;
}
}
public class FormulaSample : ObservableBase
{
private decimal a;
public decimal A
{
get { return a; }
set
{
this.a = value;
RaisePropertyChanged("A");
public class Formula<T> : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged = delegate { };
private readonly Func<T> formula;
private readonly INotifyPropertyChanged source;
public Formula(INotifyPropertyChanged source, Func<T> formula, params string[] dependencyProperties)
{
this.source = source;
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 () {
var a = 10;
function functionOne() {
};
})();
var a = 10;
function functionOne() {
};
public class Person
{
}
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()