- Home /
Why does .Length not autocomplete in Monodevelop?
Is it just me or is this happening to other people also? Is this a setting I can change in the MonoDevelop settings or is this just a bug? I don't think this can be called a Unity issue but this is the best place to find people who use both so please bear with me...
My issue is this: If I create an array using [] and leave it visible to the inspector, then MonoDevelop autocompletes the Length for me. If, however, I create the exact same thing as a local variable inside a function, then autocomplete simply fails to see it as an array...
Is it just me or what?
What I'd like to know is why it's so hard for you to type .Length, and why you felt the need to waste time asking why you can't just hit enter.
Same reason you took the time to reply to his question, because you both have a lack of priorities ;-)
Now that's just rude. If the autocomplete is not working properly with that one function then how am I to be sure that all other functions show up properly?
"Just hit enter" does not apply when you can't remember a function and have to go look it up in the Docs first where simply starting to type a part of it will show me the available options and give me a "Oh, yeah, that's it" moment.
I apologize for wasting your super valuable time by asking something I wanted to know. Do you know the answer, by the way, and just feel like being rude ins$$anonymous$$d of sharing? Or do you just like insulting people who also lack the same answers as you?
...besides, mister know it all, just hitting enter when the "length" value is not selected will result in something completely different being written... Smart ass.
Answer by HeliosDoubleSix · Aug 21, 2013 at 02:27 PM
If you mean like:
int[] numbers;
numbers.Length;
Then auto complete for Length works fine for me in both MonoDevelop and the newer Xamarin
So probably a settings issue, MonoDevelop is a buggy mess
yeah, I figured as much :(
An example of something that would not work on my end is this:
void PrintStuff(string s)
{
string[] fields = s.Split(',');
for( int x = 0; x < fields.Length; x++)
print("Field "+ x + " is " + fields[x]);
}
According to the autocomplete, fields is not an array but according to the compiler, all is well with the world... :(
I tend to create rather super complex classes and like to use the autocomplete to speed up my development and as assurance that I am doing what I am doing correctly... so when it tells me "Wait, hold on, you can't do that" when I know I can, I start to have doubts... :P lol
yah that auto completes here in $$anonymous$$onoDevelop 2.8.2 ( update to newer unity or nick 2.8.2 from Unity 4 trial ) and in Xamarin
I am on 4.2 and using 2.8.2 :(
I figure it must be a setting issue then :( I thought I imagined it but I could have sworn this stopped working right after I changed my syntax highlighting options. I tried to change it back but not sure what it is supposed to be (not that highlighting should make and difference, though).
So I guess I'm stuck with this... :( Been stuck with this for weeks already...
Xamarin is a buggier mess I frequently yell at, and if you want to double-click Unity errors to open to the line you need to write up/find an interpreter yourself.
But its autocomplete is beautiful and you can search real fast.
I'm still not sure what causes this, but in some "situations" $$anonymous$$onoDevelop seems to think an array type is simply the element type of the array (so it effectively removing the square brackets []). I had that issue several times, but i don't have the time to hunt it down. Also it's difficult to reproduce since we don't know when $$anonymous$$onoDevelop is updating it's intellisens database.
I suspect some language constructs which $$anonymous$$onoDevelop can't handle right (generics, anonymous functions, lambda expression, ....)
Answer by Eroteme · Feb 18, 2014 at 04:09 PM
I'm a bit late on the thread, but here's a quick fix for those who found this page on a search engine:
You need to install the .Net Framework 3.5 for the autocomplete to work properly!
If you are using Windows 8, check out this link: http://msdn.microsoft.com/en-us/library/hh506443%28v=vs.110%29.aspx
Multiple versions of .Net Framework can run on the same computer at once, so you don't need to worry about messing up your other applications!
Enjoy!
Your answer
![](https://koobas.hobune.stream/wayback/20220613112652im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can you make a shortcut key for templates(snippets) in Monodevelop? 0 Answers
Monodevelop autocomplete on private variables 1 Answer
Unity 5.3 Monodevelop JS Not Checking for Errors or Auto-Completing/Suggesting (C# fine) 1 Answer
Monodevelop, Autocomplete No Longer Working 1 Answer
UnityScript editor with code completion (MonoDevelop?) (MacOSX) 2 Answers