The gammatical masculine and feminine genders in Danish are functionally the same, there's no difference in the definite and indefinite articles or the inflection of adjectives. I guess you meant common and neuter? You'd just have to learn the gender with each word. Otherwise you can tell with the indefinite and definite suffixes used, or how the adjectives are inflected. Like with 'et æg', you know automatically know 'egg' is neuter because 'et' is the neuter indefinite article. It's the same for all other words.