Kaprekar's constant algorithm in c#
6174 is Kaprekar Constant, I don't know why you're using it as an
input argument  while it should be within the method. So, you'll only
need to pass one int argument.
there is no need to call ToString to get the length of the integer.
You can check the integer range instead. So, this num.ToString().Length != 4 can be converted to num &gt;= 1000 &amp;&amp; num &lt;= 9999.
using LINQ is fine, but in your case, I don't see a need of that. As you have fixed input length (4 digits), you can simply converted to string, then just do str[index] where the index would be a range of 0 to 3.
why are you using while(true) while you could enforce kaprekar's
constant condition by using while(diff != 6174).
No need for recursive method.


here is a standard version : 

int KaprekarsConstant(int num)
{

    // zero == zero
    if (num == 0) { return 0; }

    // if num is not between 1000 and 9999 throw exception
    if(num &gt;= 1000 &amp;&amp; num &lt;= 9999) { throw new ArgumentException(); }

    // will be used inside the loop
    var diff = num;

    // number of repeatation
    var numberOfRepeatation = 0;

    do // do it at least once.
    {
        //to array 
        var digitsAsc = new int[4];

        for (var x = 0; x &lt; 4; x++)
        {
            digitsAsc[x] = diff % 10;
            diff /= 10;
        }

        // sort the elements in the array to ascendent order
        Array.Sort(digitsAsc);

        //now, digitsAsc array is in ascedent order, we will resorted into descendent order
        var digitsDesc = new int[4];

        for (var x = 0; x &lt; 4; x++)
        {
            digitsDesc[x] = digitsAsc[3 - x];
        }

        // convert them to int
        var asce = int.Parse(string.Join(string.Empty, digitsAsc));

        var desc = int.Parse(string.Join(string.Empty, digitsDesc));

        diff = desc - asce;

        numberOfRepeatation++;

    }
    while (diff != 6174);

    return numberOfRepeatation;
}


if you're into LINQ, here is LINQ version : 

int KaprekarsConstant(int num)
{
    // zero == zero
    if (num == 0) { return 0; }

    // if num is not between 1000 and 9999 throw exception
    if(num &gt;= 1000 &amp;&amp; num &lt;= 9999) { throw new ArgumentException(); }

    // will be used inside the loop
    var diff = num;

    // number of repeatation
    var numberOfRepeatation = 0;

    do // do it at least once.
    {
        //to ascedent array 
        var digitsAsc = Array
            .ConvertAll(diff.ToString().ToCharArray(), x =&gt; (int)char.GetNumericValue(x))
            .OrderBy(x=&gt;x)
            .ToArray();

        //now, digitsAsc array is in ascedent order, we will resorted into descendent order by calling Reverse;
        var digitsDesc = digitsAsc.Reverse().ToArray();

        // convert them to string (this is similar to string.Join)
        var asce = digitsAsc
            .Aggregate(new StringBuilder(), (x, y) =&gt; x.Append(x.Length == 0 ? string.Empty : string.Empty).Append(y))
            .ToString();

        var desc = digitsDesc
            .Aggregate(new StringBuilder(), (x, y) =&gt; x.Append(x.Length == 0 ? string.Empty : string.Empty).Append(y))
            .ToString();

        diff = int.Parse(desc) - int.Parse(asce);

        numberOfRepeatation++;

    }
    while (diff != 6174);

    return numberOfRepeatation;
}