title: how to pass and use C# enum list to Javascript file and use in it
body: <p>I have C# enum list class like ,</p>
  
  <pre><code>namespace MyProject.MyEnumListClass
  {
   public enum MyEnum
    {
      ValueOne,
      ValueTwo,
      ValueThree,
      ValueFour,
      ValueFive,
      ValueSix
     }
   }
  </code></pre>
  
  <p>And this is how I use this list in javascript inside razor cshtml </p>
  
  <pre><code>@using MyProject.MyEnumListClass
  
  &lt;script&gt;
    .....
  
  if (type != "@((int)MyEnum.ValueThree)") 
  
   .....
  &lt;/script&gt;
  </code></pre>
  
  <p>It's easily done in razor by using razor's <code>@</code> to reference those enum values in javascript code. But now,
  I want to seperate this javascript code to <code>.js</code> file and I'm trying to pass this enum list to javascript file and use in it.<br>
  What is the best and proper way to use C# enum list inside javascript seperated file ?</p>