Can I use a varaible with Getcomponent

My game is almost finished without posting any questions. But I am stumped on this one. I am trying to condense my code by using a variable to my game object reference. I was using RowA or RowB and so on in each 7 sections. I though i could reduce this to 1 section by assigning RowA or whatever the choice to the variable row. I get an error that Type char does not contain a definition for Get Component. Thanks for any help.

if (row [plantIndex].GetComponent  ().sprite == null) {
			row [plantIndex].GetComponent <SpriteRenderer> ().sprite = Corn1;

This is my first post so don’t beat me up if i didn’t do it right.

I thought it would be a simple way to shrink my code but I guess I can’t do that now.


I tried different types but I started with GameObject since it was trying to access the GameObjects Component of SprteRenderer.