BF interpreter written in C#
int pointer = 1;



Looks like you're throwing away memory[0] here; I'd expect the pointer to initialize at the very start of the "tape".




if (System.IO.File.Exists(args[0]) == true)



The == true part is redundant, and the fully-qualified File.Exists feels... crowded. I'd remove System.IO. and add using System.IO; at the top of the file.

Arguably if no argument is specified, you should be throwing some ArgumentException instead of just saying "specify the source file" and exiting with a code-0, which would be interpreted as a successful run. Such a guard clause would help reduce nesting in the Main procedure:

    public static void Main(string[] args)
    {
        if (args.Length == 0)
        {
            throw new ArgumentException("No source file was specified.");
        }
        if (!File.Exists(args[0]))
        {
            throw new FileNotFoundException("Specified source file was not found.");
        }

        BF(System.IO.File.ReadAllText(args[0]).ToCharArray());
    }


Notice the consistency with brace positioning; your code alternates between C#-style and Java-style braces, depending on whether we're looking at a member or its body - it really doesn't matter which one you prefer, but pick a style, and stick to it.



"BF" might perhaps possibly make a [bad] class name - it's a noun. But here BF is a method, and methods do something, they're verbs. Interpret or even Run would be a better choice.



BF is a simple language; you don't need to go out of your way and implement a lexer to tokenize input and a parser to make sense out of it - basically every single character is an instruction, so it makes sense to process it one character at a time.

But is it ideal to read an entire file's contents, iterate every single character to create a character array, and then pass that array to a method that will iterate it one item at a time? Seems rather inefficient, considering you could be streaming the file content into the interpreter, and finish interpreting the BF program as you finish reading the last character in the file, having iterated the contents exactly once.



I think I'd make a separate dedicated class for the interpreter, with the pointer and memory[] as instance fields; I'd make a Dictionary&lt;char, Action&gt; to map each BF token to a dedicated method, too.