title: Converting vb to c# code
body: <p>Could you help me here, this is my friend's work(actually don't know where did he get this code, it uses vb language) and i'm trying to convert the code to c#. Thought it was easy, even though i lack of c# knowledge, and i'm stacked from here. I found a vb.net to c# converter from the net, and this is the result:
  *see the comment below</p>
  
  <p><strong>clsProcess.cs:</strong></p>
  
  <pre><code>using Microsoft.VisualBasic;
  using System;
  using System.Collections;
  using System.Collections.Generic;
  using System.Data;
  using System.Diagnostics;
  using System.Drawing;
  
  [Serializable()]
  public class clsProcess : IComparable&lt;clsProcess&gt;
  {
  
      public int Priority
      {
          get { return _Priority; }
          set { _Priority = value; }
      }
      public Color ProcessColor
      {
          get { return _ProcessColor; }
          set { _ProcessColor = value; }
      }
      public double ArrTime
      {
          get { return _ArrTime; }
          set { _ArrTime = value; }
      }
      public double ExeTime
      {
          get { return _ExeTime; }
          set { _ExeTime = value; }
      }
      public string Label
      {
          get { return _Label; }
          set { _Label = value; }
      }
  
      public clsProcess()
      {
      }
  
      public clsProcess(int prior, double arr, double exe, string lbl, Color clr)
      {
          _Priority = prior;
          _ArrTime = arr;
          _ExeTime = exe;
          _Label = lbl;
          _ProcessColor = clr;
      }
  
      private double _ArrTime;
      private double _ExeTime;
      private string _Label;
      private int _Priority;
  
      private Color _ProcessColor;
  
      public int CompareTo(clsProcess other)
      {
          switch ((modGlobals.SortColumn))
          { 
  
  //The method SortType from modGlobals.cs is the error.
  //Error says: The name 'SortType' does not exist in the current context
  //I'm getting error from here:
              case SortType.Arr:
                  return this.ArrTime.CompareTo(other.ArrTime);
              case SortType.Exe:
                  return this.ExeTime.CompareTo(other.ExeTime);
              case SortType.Label:
                  return this.Label.CompareTo(other.Label);
              case SortType.Prior:
                  return this.Priority.CompareTo(other.Priority);
  //Until here.
          }
      }
  
  }
  </code></pre>
  
  <p><strong>modGlobals.cs:</strong></p>
  
  <pre><code>using Microsoft.VisualBasic;
  using System;
  using System.Collections;
  using System.Collections.Generic;
  using System.Data;
  using System.Diagnostics;
  static class modGlobals
  {
  
      public enum SortType  //The error referring to.
      {
          Arr,
          Exe,
          Prior,
          Label
      }
  
      public static SortType SortColumn; //I doubt it has something to do here.
  
  
      public static List&lt;clsProcess&gt; CreateMemberwiseClone(List&lt;clsProcess&gt; pList)
      {
  
          List&lt;clsProcess&gt; tempList = new List&lt;clsProcess&gt;();
          int i = 0;
          for (i = 0; i &lt;= pList.Count - 1; i++) {
              tempList.Add(CloneProcess(pList[i]));
          }
          return tempList;
  
      }
  
      public static clsProcess CloneProcess(clsProcess process)
      {
  
          clsProcess temp = new clsProcess();
          temp.ExeTime = process.ExeTime;
          temp.ArrTime = process.ArrTime;
          temp.Label = process.Label;
          temp.Priority = process.Priority;
          temp.ProcessColor = process.ProcessColor;
          return temp;
  
      }
  
  
      public static void MergeBlocks(ref List&lt;clsBlock&gt; blocks)
      {
          if (blocks.Count &lt; 2)
              return;
  
          int i = 0;
  
  
          while (i &lt; blocks.Count - 1) {
  
              if (blocks[i].BlockCaption == blocks[i + 1].BlockCaption) {
                  blocks[i].BlockLength += blocks[i + 1].BlockLength;
  
                  blocks.RemoveAt(i + 1);
  
                  i -= 1;
  
              }
  
              i += 1;
  
          }
  
      }
  
  }
  </code></pre>
  
  <p>Could you give me an alternate solution for here?</p>