C# greedy algorithm to pick activities that do not clash with each other (corrected)
One of the prevailing rules of C# code development is that your code should be readable by others.  That means the intent of what you are doing should be easily determined by someone else reading your code.

This is not the case with your post.

I can't even begin to comment upon your algorithm without taking lots of time to figure out what you are doing.  Therefore, my reply is about style and structure.

Don't put everything in Main().  Your app wants to do 3 overall things:


Read inputs 
Run thru a calculation
Write outputs


Your Main() would be simplified along those division of duties.  Thus your new Main() would:


Call the method that reads and validates inputs 
Call the method performing calculations based on the validated inputs
Call the method performing outputs


Choose better names for your objects. a, b, and indx tell me little and are hard to follow.  Especially with indx and this notion of pointing to an indx.  C# has wonderfully modern features like classes.  Something like:

public class Interval
{
    public int Start { get; set; }
    public int End { get; set; }
}


Ditch using pointers to another array.  I see no reason to use a[indx[i], 0].  In conjunction with using a class or struct, there's no reason to have a multi-dimensional array.

Imagine how easy it would be to follow your logic that instead of cryptically using:

last = b[i];


Where it's easy to get lost on b[i] and wonder what last means (e.g. does it mean last element in the array or last value you worked with), that you could instead have a List&lt;Interval&gt; (or if you insist Interval[]) in a variable named intervals and you could use:

largestEnd = intervals[i].End;


It's much easier for someone to follow what you mean.  And once they can follow that, they will be better positioned to comment on the algorithm.