Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
IComparer and Sort
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 31 of 31 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tony Johansson  
View profile  
 More options Nov 7, 6:21 am
Newsgroups: microsoft.public.dotnet.languages.csharp
From: "Tony Johansson" <johansson.anders...@telia.com>
Date: Sat, 07 Nov 2009 11:21:37 GMT
Local: Sat, Nov 7 2009 6:21 am
Subject: Re: IComparer and Sort
This was strange.
I use Red Gates's .NET Reflector.
Version on mscorlib.dll is 4f9ab708-48fd-43f4-869a-008e7cb40aa8

I get QuickSort in this way.
1. Select mscorlib.dll
2. Select System
3. Select SorterObjectArray
4. Select QuickSort

Here is the text that can be read at the bottom left

internal void QuickSort(int left, int right);
      Declaring Type: System.Array+SorterObjectArray
      Assembly: mscorlib, Version=2.0.0.

I get the same result if I start form main using reflector and click until I
reach QuickSort
Have you any idea why I don't see the correct source code in Reflector

//Tony


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Duniho  
View profile  
 More options Nov 7, 2:07 pm
Newsgroups: microsoft.public.dotnet.languages.csharp
From: Peter Duniho <no.peted.s...@no.nwlink.spam.com>
Date: Sat, 07 Nov 2009 11:07:09 -0800
Local: Sat, Nov 7 2009 2:07 pm
Subject: Re: IComparer and Sort

Tony Johansson wrote:
> This was strange.
> I use Red Gates's .NET Reflector.
> Version on mscorlib.dll is 4f9ab708-48fd-43f4-869a-008e7cb40aa8

That's a GUID.  Technically, it's the unique number describing the
assembly, but IMHO the version information is more useful/understandable.

On my computer (Windows 7, .NET 3.5), the assembly version is
"2.0.50727.4927".

> I get QuickSort in this way.
> 1. Select mscorlib.dll
> 2. Select System
> 3. Select SorterObjectArray

Your step #3 shouldn't work.  You should need to select Array first.

> 4. Select QuickSort

> Here is the text that can be read at the bottom left

> internal void QuickSort(int left, int right);
>       Declaring Type: System.Array+SorterObjectArray
>       Assembly: mscorlib, Version=2.0.0.

> I get the same result if I start form main using reflector and click until I
> reach QuickSort
> Have you any idea why I don't see the correct source code in Reflector

No, sorry I don't.  At the very least, if you run Reflector on the exact
same computer where you produced the stack trace showing the call to
SwapIfGreaterWithItems(), it should produce a view of the assembly that
is consistent with the stack trace.  The only reason it would/should be
different is if you are looking at a different assembly in Reflector
than you are using in your program.

That _could_ happen if you have multiple versions of the .NET assemblies
lying around on your computer.  But _that_ shouldn't happen normally.  A
person would have to intentionally clutter their computer like that, and
surely that's something you'd remember having done?

All that said, you can verify the exact file being used in both
Reflector and in the debugger.  In Reflector, just select the DLL
itself, and the information pane will show you the file path.

In the debugger, it might be a little more tricky.  You can easily see
the source of each DLL loaded in the process by, while debugging,
displaying the "Modules" debug window.  But normally, a DLL like
mscorlib.dll is executed from the GAC and this won't match directly with
the path shown in Reflector.

Of course, if it turns out you're loading a version of mscorlib.dll
that's not in the GAC, then that's probably your problem right there.
:)  But, if it's in the GAC, AFAIK the best you can do is look at the
entry in the .NET Framework 2.0 Configuration MMC plug-in, but the only
semi-unique identifier that goes with an assembly in the GAC is the
public key token, and I don't recall whether that changes each version
(for sure, it's not unique to the assembly, because lots of other
assemblies share the same public key token...but it might be unique for
the framework version).

Anyway, that's a long way of saying, no...I don't know why on your
computer the stack trace doesn't match what you see in Reflector.

Pete


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Johansson  
View profile  
 More options Nov 8, 8:03 am
Newsgroups: microsoft.public.dotnet.languages.csharp
From: "Tony Johansson" <johansson.anders...@telia.com>
Date: Sun, 08 Nov 2009 13:03:07 GMT
Local: Sun, Nov 8 2009 8:03 am
Subject: Re: IComparer and Sort
Hello!

Now I get the same contents as you have in QuickSort.
In the References in the solution Expolere I used this location
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
so I use this location in reflector now.

Earlier I used this location in reflector
Location:
%ProgramFiles%\Microsoft.NET\SDK\CompactFramework\v2.0\Debugger\BCL\

I just wonder how does the program Red Gate's Reflector decide which
assembly to use when there
exist several assembly for example System.dll and mscorlib.dll and these
assembly have differerent contents.

//Tony

"Peter Duniho" <no.peted.s...@no.nwlink.spam.com> skrev i meddelandet
news:%23Ri6B29XKHA.3696@TK2MSFTNGP02.phx.gbl...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Johansson  
View profile  
 More options Nov 8, 8:03 am
Newsgroups: microsoft.public.dotnet.languages.csharp
From: "Tony Johansson" <johansson.anders...@telia.com>
Date: Sun, 08 Nov 2009 13:03:10 GMT
Local: Sun, Nov 8 2009 8:03 am
Subject: Re: IComparer and Sort
Hello!

Now I get the same contents as you have in QuickSort.
In the References in the solution Expolere I used this location
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
so I use this location in reflector now.

Earlier I used this location in reflector
Location:
%ProgramFiles%\Microsoft.NET\SDK\CompactFramework\v2.0\Debugger\BCL\

I just wonder how does the program Red Gate's Reflector decide which
assembly to use when there
exist several assembly for example System.dll and mscorlib.dll and these
assembly have differerent contents.

//Tony

"Peter Duniho" <no.peted.s...@no.nwlink.spam.com> skrev i meddelandet
news:%23Ri6B29XKHA.3696@TK2MSFTNGP02.phx.gbl...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Johansson  
View profile  
 More options Nov 8, 8:03 am
Newsgroups: microsoft.public.dotnet.languages.csharp
From: "Tony Johansson" <johansson.anders...@telia.com>
Date: Sun, 08 Nov 2009 13:03:47 GMT
Local: Sun, Nov 8 2009 8:03 am
Subject: Re: IComparer and Sort
Hello!

Now I get the same contents as you have in QuickSort.
In the References in the solution Expolere I used this location
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
so I use this location in reflector now.

Earlier I used this location in reflector
Location:
%ProgramFiles%\Microsoft.NET\SDK\CompactFramework\v2.0\Debugger\BCL\

I just wonder how does the program Red Gate's Reflector decide which
assembly to use when there
exist several assembly for example System.dll and mscorlib.dll and these
assembly have differerent contents.

//Tony

"Peter Duniho" <no.peted.s...@no.nwlink.spam.com> skrev i meddelandet
news:%23Ri6B29XKHA.3696@TK2MSFTNGP02.phx.gbl...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Johansson  
View profile  
 More options Nov 8, 8:03 am
Newsgroups: microsoft.public.dotnet.languages.csharp
From: "Tony Johansson" <johansson.anders...@telia.com>
Date: Sun, 08 Nov 2009 13:03:51 GMT
Local: Sun, Nov 8 2009 8:03 am
Subject: Re: IComparer and Sort
Hello!

Now I get the same contents as you have in QuickSort.
In the References in the solution Expolere I used this location
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
so I use this location in reflector now.

Earlier I used this location in reflector
Location:
%ProgramFiles%\Microsoft.NET\SDK\CompactFramework\v2.0\Debugger\BCL\

I just wonder how does the program Red Gate's Reflector decide which
assembly to use when there
exist several assembly for example System.dll and mscorlib.dll and these
assembly have differerent contents.

//Tony

"Peter Duniho" <no.peted.s...@no.nwlink.spam.com> skrev i meddelandet
news:%23Ri6B29XKHA.3696@TK2MSFTNGP02.phx.gbl...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google