In principle, you cannot modify frequency of the sound from microphone in real time, because if would violate principle of Causality, pretty much like like travel or sending data at the speed above the speed on light. I'm serious. Ha-ha! ;) case closed.
Stop! Don't start flamе, anyone! Think first. See below.
In reality, it all depends on what you call "change frequency".
If this is about real-time voice modification, such tricks are possible by digitally transforming input signal to introduce non-linear distortions. In particular, perceivable pitch of the human voice can be modified, but this is absolutely not the same as change in frequency.
Is it something you're interesting in? Google something like this:
("Voice modification" OR "Voice Changer" OR "Pitch Changer") "C#" "Open Source"
If not, sorry: you should have explained better what do you want...