Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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?
Posted

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.

  • *Experts*
Posted

Well there you go - SortedList isn't available in the Compact Framework :)

 

-ner

"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
Posted
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 ?

"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

Posted

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

Posted

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.

"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

Posted

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

Posted

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

"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

Posted

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

Posted

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.

"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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...