Skip to content

Instantly share code, notes, and snippets.

@AIBrain
AIBrain / TranslateType.cs
Last active November 6, 2020 13:02 — forked from tecmaverick/SqlDbType2DbType.cs
Translate .NET Type to SqlDbType or DbType and back.
namespace Devintelligence.Common.Data {
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using JetBrains.Annotations;
/// <summary>
/// <para>This class supports conversion between .NET <see cref="Type"/>, <see cref="SqlDbType"/>, and <see cref="DbType"/>.</para>
namespace WorstApplicationEver {
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
/// <summary>
/// I wrote this so as many lines as possible make you stop and say "wtf, why????", yet still be
/// perfectly 'legal' code (but doesn't have to have expected results).
/// As much code as possible to do the least amount of work.
namespace RPG {
using System;
using System.Collections.Generic;
using System.Linq;
internal class Program {
/// <summary>
/// Puts your comments in here, instead of near the end brackets.