How come you can use both with sandwich? also, I wonder why the plural form is both Sandwiche and Sandwiches?
Many loanwords can be both neuter and masculine and “Sandwich” is one of those. Both “der Sandwich” and “das Sandwich” is correct, so you can say both: „Ich esse ein Sandwich“ (accusative neuter) and: „Ich esse einen Sandwich“ (accusative masculine).
You can't use both. It has to be "ein Sandwich". And although it is correct, that Sandwich can be both neuter and masculine, most germans just say "das Sandwich". I've never heard "der Sandwich".
The gender that loan words adapt normally depends on their association with known german words.
p.e. it's "der Computer" because it has a, typically masculine, "-er" ending.
I only know "das Sandwich".
But I have heard both "der Hotdog" and "das Hotdog"...
And Achudars got it wrong. If it's neuter the accusative with indefinite article must also be "ein Sandwich". (if it were male, the accusative would have to be "einen Sandwich" [I hope this clears up why evali's answer is misleading, too])
@lavi: I am a native speaker and I just can tell you that "einen Sandwich" doesn't exist. With the definite article it is "das Sandwich" and with the infinite article it is "ein Sandwich" - so definite it is female and indefinite it's male - one of the many weird things of the German language. @deadfrost: no, it is not the same. "a/an" is compareable to "ein / eine / eines" (this are the indefinite articles) but you say "Das ist ein Apfel" (This is an apple) and "Ich esse einen Apfel" (I eat an apple).