Showing posts with label static. Show all posts
Showing posts with label static. Show all posts

Wednesday, March 28, 2012

String.Compare() versus String.Equals()

Hi,

System.String class contains the static methods'Compare' and'Equals' which are used for string comparison.

public static int Compare(string strA,string strB)

public static bool Equals(string a,string b)

Please, can someone tell me the difference between these two methods...

Thank you,

The author of this blog entry seems to know:http://blogs.msdn.com/bclteam/archive/2007/05/31/string-compare-string-equals-josh-free.aspx

Interesting.


HI,

Check this out

http://www.vikramlakhotia.com/Difference_between_stringcompare_and_stringEquals.aspx

Tuesday, March 13, 2012

Struggling - static vs void etc?

I am really struggling to conceptually understand classes in C# especially
the use of the strange keywords 'static' 'void' and 'override'...

Is there a 'idiots' way of understanding these concepts broadly before even
touching a line of code...

Thanks
JasonGoogle: "C# Class Design"
WROX "C# Class Design - Coding Effective Classes Handbook" is what you need.

--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/

<jason@.catamaranco.com> wrote in message
news:eawJ2zs6EHA.1260@.TK2MSFTNGP12.phx.gbl...
> I am really struggling to conceptually understand classes in C# especially
> the use of the strange keywords 'static' 'void' and 'override'...
> Is there a 'idiots' way of understanding these concepts broadly before
even
> touching a line of code...
>
> Thanks
> Jason
Static = non-object
Void = a method that does not return a value
Override = when you decide to discard the origins and implenet your own.

The better definitions can be viewed here:
http://msdn.microsoft.com/library/d...keywords_pg.asp

John

<jason@.catamaranco.com> wrote in message
news:eawJ2zs6EHA.1260@.TK2MSFTNGP12.phx.gbl...
>I am really struggling to conceptually understand classes in C# especially
> the use of the strange keywords 'static' 'void' and 'override'...
> Is there a 'idiots' way of understanding these concepts broadly before
> even
> touching a line of code...
>
> Thanks
> Jason
This should help get you started.

http://www.geocities.com/jeff_louie/oop.htm

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Thanks guys...!
<jason@.catamaranco.com> wrote in message
news:eawJ2zs6EHA.1260@.TK2MSFTNGP12.phx.gbl...
> I am really struggling to conceptually understand classes in C# especially
> the use of the strange keywords 'static' 'void' and 'override'...
> Is there a 'idiots' way of understanding these concepts broadly before
even
> touching a line of code...
>
> Thanks
> Jason
I found this sample chapter on C# extremly helpful...as a newbie I have
been searching for a 'magic' way to instantly digesting the 'broad' concepts
in C# this tutorial helped me a lot:

http://www.joegrip.com/csharp-course.html (see flash C#)

- Jason
<jason@.catamaranco.com> wrote in message
news:eawJ2zs6EHA.1260@.TK2MSFTNGP12.phx.gbl...
> I am really struggling to conceptually understand classes in C# especially
> the use of the strange keywords 'static' 'void' and 'override'...
> Is there a 'idiots' way of understanding these concepts broadly before
even
> touching a line of code...
>
> Thanks
> Jason