Click here to Skip to main content
15,904,416 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why do I get a "Cross thread" Exception? Pin
Luc Pattyn23-Jul-09 13:12
sitebuilderLuc Pattyn23-Jul-09 13:12 
AnswerRe: Why do I get a "Cross thread" Exception? Pin
PIEBALDconsult23-Jul-09 8:42
mvePIEBALDconsult23-Jul-09 8:42 
QuestionHow to copy assembly from GAC to local drive ? Pin
hdv21223-Jul-09 8:06
hdv21223-Jul-09 8:06 
AnswerRe: How to copy assembly from GAC to local drive ? Pin
Ian McCaul23-Jul-09 8:20
Ian McCaul23-Jul-09 8:20 
AnswerRe: How to copy assembly from GAC to local drive ? Pin
stancrm23-Jul-09 9:17
stancrm23-Jul-09 9:17 
AnswerRe: How to copy assembly from GAC to local drive ? Pin
Abhijit Jana23-Jul-09 10:13
professionalAbhijit Jana23-Jul-09 10:13 
QuestionLittle conversion problem from visual basic to c# Pin
Member 474292223-Jul-09 7:42
Member 474292223-Jul-09 7:42 
AnswerRe: Little conversion problem from visual basic to c# Pin
0x3c023-Jul-09 7:48
0x3c023-Jul-09 7:48 
GeneralRe: Little conversion problem from visual basic to c# Pin
PIEBALDconsult23-Jul-09 7:58
mvePIEBALDconsult23-Jul-09 7:58 
GeneralRe: Little conversion problem from visual basic to c# Pin
0x3c023-Jul-09 8:02
0x3c023-Jul-09 8:02 
GeneralRe: Little conversion problem from visual basic to c# Pin
Member 474292223-Jul-09 8:09
Member 474292223-Jul-09 8:09 
GeneralRe: Little conversion problem from visual basic to c# Pin
OriginalGriff23-Jul-09 8:17
mveOriginalGriff23-Jul-09 8:17 
GeneralRe: Little conversion problem from visual basic to c# Pin
Member 474292223-Jul-09 8:25
Member 474292223-Jul-09 8:25 
GeneralRe: Little conversion problem from visual basic to c# Pin
PIEBALDconsult23-Jul-09 8:37
mvePIEBALDconsult23-Jul-09 8:37 
Questionif someone could help me identify the problem please. [modified] Pin
DinoRondelly23-Jul-09 7:20
DinoRondelly23-Jul-09 7:20 
AnswerRe: if someone could help me identify the problem please. Pin
Nagy Vilmos23-Jul-09 7:27
professionalNagy Vilmos23-Jul-09 7:27 
GeneralRe: if someone could help me identify the problem please. Pin
PIEBALDconsult23-Jul-09 7:30
mvePIEBALDconsult23-Jul-09 7:30 
GeneralRe: if someone could help me identify the problem please. Pin
Nagy Vilmos23-Jul-09 7:46
professionalNagy Vilmos23-Jul-09 7:46 
GeneralRe: if someone could help me identify the problem please. Pin
PIEBALDconsult23-Jul-09 7:48
mvePIEBALDconsult23-Jul-09 7:48 
GeneralRe: if someone could help me identify the problem please. Pin
LetMeFinclOut23-Jul-09 12:15
LetMeFinclOut23-Jul-09 12:15 
GeneralRe: if someone could help me identify the problem please. [modified] Pin
Luc Pattyn23-Jul-09 7:33
sitebuilderLuc Pattyn23-Jul-09 7:33 
GeneralRe: if someone could help me identify the problem please. Pin
Nagy Vilmos23-Jul-09 7:46
professionalNagy Vilmos23-Jul-09 7:46 
GeneralRe: if someone could help me identify the problem please. Pin
Curtis Schlak.23-Jul-09 18:02
Curtis Schlak.23-Jul-09 18:02 
Depending on your point of view, fortunately or unfortunately, not all strings in the CLI are interned. Essentially, any string loaded with the MSIL ldstr command is interned, and anything programatically interned is interned. For example, if we run the following code
string interned1 = "hello";
string interned2 = "hello";
string notinterned = new String("hello".ToCharArray());
string interned4 = string.Intern(notinterned);
Console.WriteLine(RuntimeHelpers.GetHashCode(interned1));
Console.WriteLine(RuntimeHelpers.GetHashCode(interned2));
Console.WriteLine(RuntimeHelpers.GetHashCode(notinterned));
Console.WriteLine(RuntimeHelpers.GetHashCode(interned4));
then we get the corresponding output
58225482
58225482
54267293
58225482
As you can see from the output, the interned strings all show the same "memory location" while the programatically constructed string shows a different location.

(.NET 3.5) In terms of string equality, though, the override of operator== calls the public static string.Equals(string, string) method which calls a private static method to determine equality. string.Equals(string) calls the private static method directly.

"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty

GeneralRe: if someone could help me identify the problem please. Pin
Adam R Harris23-Jul-09 7:50
Adam R Harris23-Jul-09 7:50 
GeneralRe: if someone could help me identify the problem please. Pin
Luc Pattyn3-Sep-09 5:17
sitebuilderLuc Pattyn3-Sep-09 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.