i am able to use this in an exe, or even compile it as a dll, but I am not able to use it in other projects.
any clues?
regards,
abhijit
Code:namespace StrClass { /* * My First Class with C#. * I could not find a function to reverse a string in c# * strReverse is only present in VB.NET so I wrote one myself. * -Abhijit */ public class StrReverse { public string strReverse(string sInput) { //Function To Reverse a string char[] c; c = sInput.ToCharArray(); string revstring = " "; for(int i = c.Length;i != 0;i--) { revstring = revstring + c[i-1].ToString(); } return revstring; } } } /* namespace testApp { class mainapp { public static void Main() { StrClass.StrReverse a = new StrClass.StrReverse(); string zzz = a.strReverse("Cool"); Console.WriteLine("{0}",zzz); } } } */




Reply With Quote