An optoelectronic device comprising: a plurality of nanostructures, the nanostructures including photo-active regions associated with p-n junctions, the plurality of nanostructures having tops, bottoms, and sidewalls; a bottom electrical contact (102, 104b) in electrical contact with the bottoms of the plurality of nanostructures; said device comprises: a top electrical contact (104a, 1012) in electrical and physical contact with sidewalls of the plurality of nanostructures, wherein the top electrical contact (104a, 1012) leaves a top portion of the plurality of nanostructures exposed to allow light to enter or leave the plurality of nanostructures from the tops of the plurality of nanostructures without passing through the top electrical contact (104a, 1012); and the optoelectronic device is configured to: i) forward bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to cause emission of photons out of the optoelectronic device through the tops of the plurality of nanostructures; or ii) reverse bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to detect photons that enter the optoelectronic device through the tops of the plurality of nanostructures. a plurality of nanostructures, the nanostructures including photo-active regions associated with p-n junctions, the plurality of nanostructures having tops, bottoms, and sidewalls; a bottom electrical contact (102, 104b) in electrical contact with the bottoms of the plurality of nanostructures; said device comprises: a top electrical contact (104a, 1012) in electrical and physical contact with sidewalls of the plurality of nanostructures, wherein the top electrical contact (104a, 1012) leaves a top portion of the plurality of nanostructures exposed to allow light to enter or leave the plurality of nanostructures from the tops of the plurality of nanostructures without passing through the top electrical contact (104a, 1012); and the optoelectronic device is configured to: i) forward bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to cause emission of photons out of the optoelectronic device through the tops of the plurality of nanostructures; or ii) reverse bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to detect photons that enter the optoelectronic device through the tops of the plurality of nanostructures. a top electrical contact (104a, 1012) in electrical and physical contact with sidewalls of the plurality of nanostructures, wherein the top electrical contact (104a, 1012) leaves a top portion of the plurality of nanostructures exposed to allow light to enter or leave the plurality of nanostructures from the tops of the plurality of nanostructures without passing through the top electrical contact (104a, 1012); and the optoelectronic device is configured to: i) forward bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to cause emission of photons out of the optoelectronic device through the tops of the plurality of nanostructures; or ii) reverse bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to detect photons that enter the optoelectronic device through the tops of the plurality of nanostructures. i) forward bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to cause emission of photons out of the optoelectronic device through the tops of the plurality of nanostructures; or ii) reverse bias the p-n junctions using the bottom electrical contact (102, 104b) and the top electrical contact (104a, 1012) to detect photons that enter the optoelectronic device through the tops of the plurality of nanostructures.