1.         public string DecimalToOct(string data)
            {
                string result = string.Empty;
                int rem = 0;
                try
                {
                    if (!IsNumeric(data))
                        error = "Invalid Value - This is not a numeric value";
                    else
                    {
                        int num = int.Parse(data);
                        while (num > 0)
                        {
                            rem = num % 8;
                            num = num / 8;
                            result = rem.ToString() + result;
                        }
                    }
                }
                catch (Exception ex)
                {
                    error = ex.Message;
                }
                return result;
            }
    0

    Add a comment

Blog Archive
Topics
Topics
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.