I believe that an answer in the OS does more or less what you want. It would be something like this:
using System;
using EnvDTE;
using EnvDTE80; //não sei se precisa de todos eles
using EnvDTE90;
using EnvDTE90a;
using EnvDTE100;
using System.Diagnostics;
public class CountNonWhiteSpaceCharacters {
void Count() {
//coloca onde quiser, pode ser no status, abrir outro tipo de controle, etc.
MsgBox("Count " + DTE.ActiveDocument.Selection().Text.Length.ToString());
}
}
I put in the Github for future reference.
Need to register to this extension. There documentation which can help if you’ve never created an extension for Visual Studio.
Its application is Web Form, Windows Forms or ...???
– novic
That makes no difference, I want the selection of Visual Studio itself, in its own code editor.
– CypherPotato
So please put this information, that the text is the code of your application!
– novic
I’ll edit the question.
– CypherPotato
@Cypherpotato The answer solved what was in doubt? Do you need something else to be improved? Do you think it is possible to accept it now?
– Maniero