In my VB.Net 2019, the Intellisense auto-complete list is showing many unnecessary methods for objects of type String.
These methods all have the <Extension> attribute, as shown in the attached screenshot. Many of them seem to be data-related, such as Any, All, and Distinct. But others are not and seem wrong for String, such as Average, Count, and Intersect.
For this screenshot, I created a test-project, and removed everything from References except System and Microsoft.VisualBasic, and still the extension methods are there.
Where do these methods come from?
I understand I can click the buttons on the auto-complete list for Properties and Methods to show only those. But also I would like to understand where the extension methods are coming from for my own education.


You're seeing those extension methods because
StringimplementsIEnumerable(Of Char)and theSystem.Linqnamespace is automatically imported as part of your project properties. The methods you highlighted are standard Linq extension methods for anything that implementsIEnumerable(Of T).You can see this if you look closely at the IntelliSense; note that it reads "<Extension> Function IEnumerable(Of Char).Aggregate...".
You can control the automatic imports through the "References" ply in project properties (it's in the same place in both original and SDK style projects). I believe
System.Linqis one of the defaults.Additionally, there are options settings where IntelliSense may "show items from unimported namespaces" (see Tools / Options / Text Editor) which may lead to the extension methods being shown even if you have removed
System.Linqas a default import. See the self-answer for more details on changing these option settings.