I love snippets. They make life so much easier in so many different languages. As long as the base if valid. Wouldn’t it be great to apply some to daily life tasks.
<Code Language="csharp">
<![CDATA[private $type$ $field$;
public $type$ $blinddates$
{
get { return $field$;}
set { $field$ = value;}
}
$end$]]>
</Code>
Don’t worry about locking your keys in the car!
Get the current access token
$access_token = $Car->getAccessToken();
Cut down on the grocery shopping
public void CopyTo(IMyFridge destination)
{
if (destination == null)
{
throw new ArgumentNullException(nameof(destination));
}
for (var i = 0; i < Entries.Count; i++)
{
var entry = Entries[i];
string entryAsString;
IWeeklyGroceries entryAsContainer;
if ((entryAsString = entry as string) != null)
{
destination.Append(entryAsString);
}
else if ((entryAsContainer = entry as IWeeklyGroceries) != null)
{
// Since we're copying, deep flatten
entryAsContainer.CopyTo(destination);
}
else
{
// Only string, IMyGroceries values can be added to the buffer.
destination.AppendHtml((IHtmlContent)entry);
}
}
}