title: C# custom variables
body: <p>I was experimenting with making a custom variables but got stuck.</p>
  
  <p>I'm still new to C# so it's only expected for me to not know what's happening, I guess..</p>
  
  <pre><code>struct MyCustomStringVariable
  {
      public static implicit operator MyCustomStringVariable(string input)
      {
          return input;
      }
  }
  
  class Program
  {
      static MyCustomStringVariable myCustomString = "This is a string!";
  
      static void Main(string[] args)
      {
          Console.WriteLine(myCustomString);
          Console.ReadLine();
      }
  }
  </code></pre>
  
  <p>The following exception is thrown </p>
  
  <blockquote>
    <p>System.StackOverflowException: 'Exception of type 'System.StackOverflowException' was thrown.'</p>
  </blockquote>