1
I have the following code:
var font = new Font("Arial", 50);
var texto = "Meu texto";
var res = Graphics.MeasureString(texto, font); // Está linha não funciona.
When compiling the following error is generated:
An Object Reference is required for the non-static field, method, or Property 'System.Drawing.Graphics.Measurestring(string, System.Drawing.Font)'
What needs to be done to use the MeasureString
?
It is windows Forms?
– Jéf Bueno
Asp.Net MVC . Net Framework 4. Works will be?
– Jedaias Rodrigues
No. I’ll see a solution for you. Don’t forget to tag
asp.net mvc
– Jéf Bueno