Good question!
I guess it depends on how are you refering to christianity, if you are talking about christian religion then I guess is not mandatory to be a christian to have a moral code, because all religions follow a moral code that it's more or less the same with some minor variations.
if you don't believe in God, you still have a consciousness that guides you, whether you decided to listen or not, if you don't listen to her voice you will feel bad because you would have filled it with bad thoughts or actions.
where does this conciousness comes? a lot of religions speak of a christic consciousness it is a bit hard to explain what the christic consciousness is but i'll try my best.
a lot of religions speak of the holy trinity, the equivalent of it in Hinduism is Tat-Sat-Om or the Father, the Son and the holy spirit or cosmic vibration.
The father is the cosmic consciousness or God who lives in another plane of existance or dimension where nothing exists but him.
The son is the reflection of God's intelligence on the Cosmic Vibration of Om or Holy spirit, this intelligence is behind the laws of our universe both physical and metaphysical such as gravity or karma.
and Om or Holy spirit is the cosmic vibration or word who supports his creation, we as human beings created in the image of our father have this christ consciousness inside us, this is our higher self and it is from this source that our moral code comes from.
Jesus Christ or Bhagavan Krishna or "Christna" if you prefer, were called these way (Christs) because they were self realized beings, that means that they were completely in tune with christ concsiousness and their lower ego nature was completely under control of this christ conciousness.
so, at least imho if you are following your higher consciousness, thus having a moral code means you are a christian at least in this sense.
Love and Light