|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
[help a mono newbie[Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)]
Can anyone tell me how to add assembly reference to a mono solution?I am trying to use system.linq to write the following prog using System; using System.Linq; namespace asdf2 { class MainClass { string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"}; public static void Main(string[] args) { IEnurmerable<string> query = from n in names let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","") where vowelless.Length > 2 orderby vowelless select n + " - " + vowelless; Console.WriteLine(vowelless); } } } _______________________________________________ Monodevelop-list mailing list Monodevelop-list@... http://lists.ximian.com/mailman/listinfo/monodevelop-list |
|
|
Re: [help a mono newbieIn Monodevelop, in treeview of the solution, make a Right lick on the "References" folder (where assembly are inside) and then click the add reference item
2009/11/4 james goforth <jamgof08@...> [Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)] -- Cordially. Small Eric Quotations of the days: --------------------------------------------------------------------------- I have no special talents. I am only passionately curious Sent from Paris, France _______________________________________________ Monodevelop-list mailing list Monodevelop-list@... http://lists.ximian.com/mailman/listinfo/monodevelop-list |
|
|
Re: [help a mono newbieYou need add a reference to System.Core in monodevelop to do a linq query to object.
2009/11/4 james goforth <jamgof08@...> [Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)] _______________________________________________ Monodevelop-list mailing list Monodevelop-list@... http://lists.ximian.com/mailman/listinfo/monodevelop-list |
|
|
Re: [help a mono newbieAlso, you need to target .NET/Mono 3.5 in project properties.
2009/11/4 james goforth <jamgof08@...> [Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)] _______________________________________________ Monodevelop-list mailing list Monodevelop-list@... http://lists.ximian.com/mailman/listinfo/monodevelop-list |
|
|
|
|
|
Re: [help a mono newbieOn Wed, Nov 4, 2009 at 1:47 PM, james goforth <jamgof08@...> wrote:
> [Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, > Type=Error, Priority=Normal, Description=The type or namespace name > `IEnurmerable`1' could not be found. Are you missing a using directive or an > assembly reference?(CS0246)] > > Can anyone tell me how to add assembly reference to a mono solution?I am > trying to use system.linq to write the following prog > using System; > using System.Linq; > > namespace asdf2 > { > > class MainClass > { > string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"}; > public static void Main(string[] args) > { > IEnurmerable<string> query = > from n in names > let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","") > where vowelless.Length > 2 > orderby vowelless > select n + " - " + vowelless; > Console.WriteLine(vowelless); > } > } > } Summary from other messages of the things you need to do: 1. Add "using System.Collections.Generic;" to the top of the file, since that's the namespace IEnumerable<T> is in. 2. Make sure you have a reference to "System" using the "edit references" dialog - right-click on the "references" folder in the project tree. 3. Double-check that the target framework is 3.5 4. Add a reference to "System.Core" because this is needed for System.Linq and the LINQ queries. 5. Fix the type name - it's "IEnumerable", not "IEnurmerable" :-) Steps 3 & 4 shouldn't be necessary, because those are the defaults in MD 2.1+, but it's worth checking just in case. Note that you can also use "var query = from ..." instead of specifying the type explicitly. -- Michael Hutchinson http://mjhutchinson.com _______________________________________________ Monodevelop-list mailing list Monodevelop-list@... http://lists.ximian.com/mailman/listinfo/monodevelop-list |
| Free embeddable forum powered by Nabble | Forum Help |