Click here to Skip to main content
15,900,907 members
Home / Discussions / C#
   

C#

 
GeneralRaise event from DLL Pin
GeezerJoe22-Jan-08 11:15
GeezerJoe22-Jan-08 11:15 
GeneralDelete/Update MS Outlook appointments Pin
NewToAspDotNet22-Jan-08 10:10
NewToAspDotNet22-Jan-08 10:10 
Generalhandling multi-threading in C#.net 3.0 Pin
anumadhu22-Jan-08 9:31
anumadhu22-Jan-08 9:31 
GeneralRe: handling multi-threading in C#.net 3.0 Pin
Skippums22-Jan-08 10:40
Skippums22-Jan-08 10:40 
Generalstring Pin
simworld22-Jan-08 8:39
simworld22-Jan-08 8:39 
GeneralRe: string Pin
J$22-Jan-08 8:42
J$22-Jan-08 8:42 
GeneralRe: string Pin
NewToAspDotNet22-Jan-08 10:08
NewToAspDotNet22-Jan-08 10:08 
GeneralRe: string Pin
Scott Dorman22-Jan-08 17:56
professionalScott Dorman22-Jan-08 17:56 
There are several ways you can compare strings in C#. The simplest way is to just test using equality:
C#
string a = "This is a test";
string b = "This is another test";
 
if (a == b) {
   // do something
}
However, this will do a case-sensistive, culture-sensitive compare which may not be what you want and isn't necessarily the most performant test.

The closest methods to strcmp in C# are going to be the String.Compare, String.CompareOrdinal or the String.CompareTo methods.

In order to copy a string, you can simply copy it. Strings in C# are immutable, so you will always get a new instance of the string:
C#
string a = "This is a test";
string b = a;
You can find all of the string methods here[^].

Scott.

—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

[Forum Guidelines] [Articles] [Blog]

GeneralRe: string Pin
simworld23-Jan-08 5:19
simworld23-Jan-08 5:19 
QuestionHow to send parameters to a running application? Pin
Gene Arnold22-Jan-08 8:19
Gene Arnold22-Jan-08 8:19 
AnswerRe: How to send parameters to a running application? Pin
Gene Arnold22-Jan-08 8:32
Gene Arnold22-Jan-08 8:32 
Generalget a BSTR from a vc++ dll to a c# string Pin
Calvin Streeting22-Jan-08 7:45
Calvin Streeting22-Jan-08 7:45 
GeneralRe: get a BSTR from a vc++ dll to a c# string Pin
led mike22-Jan-08 8:15
led mike22-Jan-08 8:15 
GeneralRe: get a BSTR from a vc++ dll to a c# string Pin
Calvin Streeting22-Jan-08 8:36
Calvin Streeting22-Jan-08 8:36 
GeneralRe: get a BSTR from a vc++ dll to a c# string Pin
led mike22-Jan-08 11:34
led mike22-Jan-08 11:34 
GeneralRe: get a BSTR from a vc++ dll to a c# string Pin
Calvin Streeting22-Jan-08 13:45
Calvin Streeting22-Jan-08 13:45 
GeneralRe: get a BSTR from a vc++ dll to a c# string Pin
led mike23-Jan-08 4:46
led mike23-Jan-08 4:46 
GeneralRe: get a BSTR from a vc++ dll to a c# string Pin
Calvin Streeting23-Jan-08 7:44
Calvin Streeting23-Jan-08 7:44 
GeneralRe: get a BSTR from a vc++ dll to a c# string Pin
led mike23-Jan-08 8:17
led mike23-Jan-08 8:17 
Questionwhat is the difference between delegate and events Pin
netJP12L22-Jan-08 7:42
netJP12L22-Jan-08 7:42 
AnswerRe: what is the difference between delegate and events Pin
PIEBALDconsult22-Jan-08 8:00
mvePIEBALDconsult22-Jan-08 8:00 
Generalmy app icon lost, in setup application in vs2005. Pin
hdv21222-Jan-08 5:59
hdv21222-Jan-08 5:59 
GeneralRe: my app icon lost, in setup application in vs2005. Pin
Skippums22-Jan-08 7:06
Skippums22-Jan-08 7:06 
GeneralRe: my app icon lost, in setup application in vs2005. Pin
hdv21222-Jan-08 7:20
hdv21222-Jan-08 7:20 
GeneralRe: my app icon lost, in setup application in vs2005. Pin
Skippums22-Jan-08 7:27
Skippums22-Jan-08 7:27 

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.