title: Convert C program to C#
body: <p>I am writing Horspool algorithm in c#. I have a c program of the same. I have converted most part of the code but am having some difficulty converting few lines of the code.</p>
  
  <p>The lines of code I am not able to figure out how to convert is</p>
  
  <pre><code>#define MAX 500
  int t[MAX]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>char src[100],p[100];
  int pos;
  clrscr();
  printf("Enter the text in which pattern is to be searched:\n");
  gets(src);
  </code></pre>
  
  <p>Can anyone please tell me how do I convert these lines into c#?</p>
  
  <p>The source for my C program code is - <a href="http://www.c-program-example.com/2011/10/c-program-to-search-perticulur-pattern.html" rel="nofollow">http://www.c-program-example.com/2011/10/c-program-to-search-perticulur-pattern.html</a></p>