sj1187534 Posted August 26, 2004 Posted August 26, 2004 Hi..I am writing an application in VB.Net and trying to use the SortedList Class. I imported both the System and System.Collections namespaces. When I am creating an instance of the SortedList class : dim sl1 as SortedList dim sl2 as System.Collections.SortedList ... it says that SortedList is not a valid object. I just dont see the class in the Collections namespace. What do you think is wrong? Thanks, SJ Quote
Administrators PlausiblyDamp Posted August 26, 2004 Administrators Posted August 26, 2004 Do you actually get the blue wavey line and the error message : Type 'System.Collections.SortedList' is not defined? or something different? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
sj1187534 Posted August 27, 2004 Author Posted August 27, 2004 Yes...I am getting the "blue wavy line"... Do you actually get the blue wavey line and the error message : Type 'System.Collections.SortedList' is not defined? or something different? Quote
Administrators PlausiblyDamp Posted August 27, 2004 Administrators Posted August 27, 2004 Could you post your exact code here - just cut and paste it so there are no typos ;) It's part of mscorlib.dll so you can't be missing a reference. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
sj1187534 Posted August 27, 2004 Author Posted August 27, 2004 The code is no different than what I have posted in the main thread. in addition to that, I am importing the System and System.Collections namespaces. If there are any typos, I am sure the intellisense is going to tell us. Anyway, I searched for the mscorlib.dll in the VS.Net 2003 folder and I could find one in the "C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE" folder. Do you think it should be somewhere else too? I forgot to tell you that my app is using the CompactFramework. I am writing a SmartDeviceApplication. Thanks. SJ Could you post your exact code here - just cut and paste it so there are no typos ;) It's part of mscorlib.dll so you can't be missing a reference. Quote
*Experts* Nerseus Posted August 27, 2004 *Experts* Posted August 27, 2004 Well there you go - SortedList isn't available in the Compact Framework :) -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Arch4ngel Posted August 27, 2004 Posted August 27, 2004 One question bring another. Can you make it available in another way ? Like importing the DLL from the "Standard" framework and copy it in your APP directory and link your app to it ? Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
sj1187534 Posted August 27, 2004 Author Posted August 27, 2004 Thats true. I realised it a little while ago. I created a new windows application and i was able to find the SortedList class. I already tried what Arch4ngel suggested but it was always saying that there is a sharing violation. I thought instead of messing around with the .dll file, maybe it is better to create a similar class by myself, only with the required functionalities. It worked fine. Thanks for the input. SJ Quote
Arch4ngel Posted August 27, 2004 Posted August 27, 2004 Ohhh... so it's not working... well I though.... lollll And no... it's not a suggestion ! :p it was a question on my own ! I don't know what can be done in CompactFramework 'cause I never used it. I'll put myself in that in a month or two maybe. Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
sj1187534 Posted August 27, 2004 Author Posted August 27, 2004 I take it back. I was able to replace the mscorlib.dll file in the CompactFramework after closing all the VS apps. I was also able to see the SortedList. But I guess it is not good to use the 2MB dll in place of a 300kb dll while we are planning to run the app on a PDA or a similar device because of the limited memory!! SJ Quote
Administrators PlausiblyDamp Posted August 27, 2004 Administrators Posted August 27, 2004 You have probably also introduced several incompatabilities on the system, caused major instabilities and done a serious breach of the EULA. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Arch4ngel Posted August 27, 2004 Posted August 27, 2004 LOLLLLLLLLLLLLLLLLLLLLL What a HACK !!! LET'S GET ROLLINNGGGGGGG !!!!! :p lollll Let's play to "Crash the PDA" !!! :p lolllll Sorry... the way you said things were funny ! :) I always enjoy seeing hack that could cause a lot of trouble ! :p lollll But anyway... it was just an idea... nothing that I tried... but... I've seen someone who tried it !!! Hey... tell me if you have to reinstall your OS on your PDA ! :p Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
sj1187534 Posted August 30, 2004 Author Posted August 30, 2004 Luckily, I am testing my app through an emulator. So, i really dont know if changing the .dll is going to cause any problem other than breaching the EULA!! SJ. LOLLLLLLLLLLLLLLLLLLLLL What a HACK !!! LET'S GET ROLLINNGGGGGGG !!!!! :p lollll Let's play to "Crash the PDA" !!! :p lolllll Sorry... the way you said things were funny ! :) I always enjoy seeing hack that could cause a lot of trouble ! :p lollll But anyway... it was just an idea... nothing that I tried... but... I've seen someone who tried it !!! Hey... tell me if you have to reinstall your OS on your PDA ! :p Quote
Arch4ngel Posted August 30, 2004 Posted August 30, 2004 LOL ! Hope it won't crash anything ! Like PD said... try to make a new class that emulate SortedList. If you want to make a try... maybe you can Decompile it with Reflector (ask me the link if you don't already know) and extract the corresponding class and make a new dll with it. I don't know if that breach the EULA... but hey.... what you need... you have to try to get it ! :p Tell me what you think about it. Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.