Skip to content

Instantly share code, notes, and snippets.

@oinant
Last active September 8, 2015 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oinant/6588e8d5d11fa4bd38cf to your computer and use it in GitHub Desktop.
Save oinant/6588e8d5d11fa4bd38cf to your computer and use it in GitHub Desktop.
using System;
namespace Builder
{
public class MyClass
{
private readonly string _aStringProperty;
private readonly bool _aGivenFlag;
private readonly bool _anotherFlag;
public MyClass(string aStringProperty, bool aGivenFlag, bool anotherFlag)
{
_aStringProperty = aStringProperty;
_aGivenFlag = aGivenFlag;
_anotherFlag = anotherFlag;
}
public object DoSomeBehavior()
{
dynamic @object = null;
@object.actionAt = DateTime.UtcNow;
@object.theName = _aStringProperty;
if (_aGivenFlag)
@object.theName = "the property : " + @object.theName;
if (_anotherFlag)
@object.theName = @object.theName.ToLower();
return @object;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment