I'm a fan of leaving it fairly ambiguous until the moment becomes critical for the reader to know. Usually though, the reader will know before they begin to read anyway because of the synopsis either you have given to the reader, or if it's published, on the back cover and/or dust jacket.
If you're not banking on that, then I would go about it as casually as possible. Give little hints here and there. Maybe what the character focuses on, or finds attractive (though in this day and age, and in my case as well, that can go both ways) would give some kind of an idea for the reader. Dialogue could potentially work too ("You're a slippery little bastard/bitch," would make the reader assume that the character who is being spoken to is male/female, respectively, in most cases) or some kind of action involving the description of a part of the character's body that would force the readers to understand their gender. Does your male main character have facial hair? Does he shave his face? Maybe your female main character is putting on mascara. There are always reasons for doubt, even with the examples I've given here, but based on what the average reader knows, one would naturally associate facial hair = man and mascara = woman, unless clearly stated otherwise.
Give it a try, see what works best for you. I wouldn't honestly get all worked up about it. Eventually, if you are writing in first person, their gender will come through through some means, even if it's not clearly stated on page one.