Adopting a child, and taking care of his expenses until his marriage is not only permissible, but indeed something very rewarding. However, taking a child into one’s care doesn’t make him similar to a biological child. For this reason, an adopted child will not inherit from the one who has adopted him (i.e. his adoptive parent). He will only inherit from his biological parents. However, if the adoptive parent, during his life time, willingly gives his adopted child a portion of his wealth, making him its sole owner, then this will be permissible as per Shari’ah, and from this, the adopted child will become the owner of the wealth.
And Allah knows best.