Hard code textures into c#

Hard coding a texture in C# hasn’t worked out so well for me. Tried it for several hours and still no luck. Someone care to direct me to a link that might help clarify my situation. Here is my code that isn’t working:

testTexture = Resources.Load(“test”) as Texture2D;
Debug.Log(testTexture.width.ToString());

coming back as void in the debug log. Every sample I have looked at says this should work?

do you have the texture in the resources folder?
maybe try “test.png” or what format it has.

Yup, tried both with no luck. Got the loadfrompath to work but not this, followed documentation to the letter.