So C D E F, transposed into the key of B, becomes B C# D# E [2].
Are you familiar with the circle of fifths (also known as the Camelot Wheel)? Once you know about that, transposing notes between keys becomes rather trivial. Diatonic notes map “linearly”, modulo any accidentals in the key signature. (Preserving this property is an important motivation for using enharmonic notes like E# vs. F). The key of B major has five sharps, viz. F, C, G, D, A.
(You can see that this is correct, by noting that the “last” sharp sign gives the leading tone in the major key. Here, A# is the leading tone in B major. With flats, the second-to last flat sign gives you the tonic in major—so, if B and E are flattened, you can tell that the major key is Bb.)
Are you familiar with the circle of fifths (also known as the Camelot Wheel)? Once you know about that, transposing notes between keys becomes rather trivial. Diatonic notes map “linearly”, modulo any accidentals in the key signature. (Preserving this property is an important motivation for using enharmonic notes like E# vs. F). The key of B major has five sharps, viz. F, C, G, D, A.
(You can see that this is correct, by noting that the “last” sharp sign gives the leading tone in the major key. Here, A# is the leading tone in B major. With flats, the second-to last flat sign gives you the tonic in major—so, if B and E are flattened, you can tell that the major key is Bb.)