title: C# Is it possible to disallow constructors with implicit conversions?
body: <p>I want to use the <a href="https://martinfowler.com/eaaCatalog/money.html" rel="nofollow noreferrer">Money</a> pattern to decrease the likelihood of mistakes that incur using raw numbers such as decimal, etc.</p>
  <p>Some parts of the system use int64, representing money in minor units i.e. 12345¢. I want to make it explicit that money is <strong>always</strong> in major units i.e. $123.45, to prevent the disastrous consequences of accidentally using $12345.</p>
  <p>The problem is that decimal is implicitly converted from a whole range of numbers including int64. Of course, I could easily create constructors for every number type and throw errors, but this only works runtime.</p>
  <pre><code>public Money(decimal amount, Currency currency)
  {
      // OK
  }
  
  public Money(long amount, Currency currency)
  {
      throw new Exception(...);
  }
  </code></pre>
  <p>Ideally I want to prevent compilation. How can this be achieved?</p>