logo       

Re: VB vs C# is there a auto documenting feature in C#: msg#00158

org.user-groups.dotnet.padnug

Subject: Re: VB vs C# is there a auto documenting feature in C#


What you're looking for is what is known as short-circuiting and is fully
supported by the .NET Framework.

Check out OrElse and AndAlso in VB.NET.

-Tom

At 10:03 PM 1/20/2005 -0800, you wrote:
>Doesn't help with VB.
>Unless there is a way to use || in VB that I am unaware of?
>
>Darth
>
>Ronald L. Ratzlaff wrote:
>
> >According to the MS doc, it's not supposed to do that if you use the
> >conditional-OR operator (||).
> >
> >"The conditional-OR operator (||) performs a logical-OR of its bool
> >operands, but only evaluates its second operand if necessary."
> >
> ><http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/h
> tml/>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/
> >vclrfororoperator.asp
> >
> >
> >Ron
> >
> >
> >
> >-----Original Message-----
> >From: Justin Collum [mailto:justin@xxxxxxxxxxxxxxxx]
> >Sent: Thursday, January 20, 2005 9:26 PM
> >To: padnug@xxxxxxxxxxxxxxx
> >Subject: Re: [padnug] VB vs C# is there a auto documenting feature in C#
> >
> >
> >I don't think that's true. Seems like I've stepped thru code and....
> >
> >Wait, just tested it and you're right. Huh? Why on earth would it do
> >that? That short circuit evaluation is pretty basic logic isn't it?
> >
> >-- Justin
> >
> >darthsmily wrote:
> >
> >
> >
> >>Speaking of if statements, does anyone know why .net evalutes both half
> >>of an 'or' statement?
> >>
> >>in some languages, the right side of an OR statement will get evaluated
> >>first, and if it is true, it goes into the statement. IF flase, it will
> >>evaluate the left half.
> >>.net seems to evaluate both sides then decide go into the
> >>statment.(assuming at least one side is true).
> >>
> >>Darthsmily
> >>
> >>
> >>Brian Russell wrote:
> >>
> >>
> >>
> >>
> >>
> >>>You misunderstood what I meant. Debugging deeply nested if statements is
> >>>
> >>>
> >a
> >
> >
> >>>pain in ANY language. If you are nesting more than 2 or 3 if statements,
> >>>and they span more than one screen, you are doing something wrong in my
> >>>opinion.
> >>>
> >>>Brian
> >>>
> >>>-----Original Message-----
> >>>From: Ken Pinard [mailto:ken@xxxxxxxxxxxxxxxx]
> >>>Sent: Thursday, January 20, 2005 8:36 PM
> >>>To: padnug@xxxxxxxxxxxxxxx
> >>>Subject: RE: [padnug] VB vs C# is there a auto documenting feature in C#
> >>>
> >>>
> >>>I couldn't disagree more with the if .. End if
> >>>
> >>>It is less difficult to debug nested constructs that have Else, End If,
> >>>Next, End While, End Sub, End function than
> >>>}, }, }, }, }, }
> >>>
> >>>Maybe you can't tell one End If from another End IF. But it the braces
> >>>
> >>>
> >have
> >
> >
> >>>no inkling as to where they belong.
> >>>
> >>>I can see why someone who uses Java would like C#. But Java was based on
> >>>
> >>>
> >C.
> >
> >
> >>>I know that different teams of developers provide different functionality.
> >>>That is what the MS guys said when we talked to them. If .Net is so
> >>>
> >>>
> >powerful
> >
> >
> >>>as to providing interactions between the programming environments, why
> >>>
> >>>
> >can't
> >
> >
> >>>MS do it?
> >>>
> >>>MS is responding to two different audiences, they have said so. The
> >>>
> >>>
> >question
> >
> >
> >>>is why is a more difficult to write language considered good? Just because
> >>>it has the legacy of coming from the 1970's? Why create this type of
> >>>
> >>>
> >issue?
> >
> >
> >>>There is no reason at all, unless people are afraid that their particular
> >>>language will fall from favor.
> >>>
> >>>Sorry about this all, but it has been a bad day. This has always been one
> >>>
> >>>
> >of
> >
> >
> >>>my sticking points though. I have used C in the past. I never liked how
> >>>
> >>>
> >long
> >
> >
> >>>it took to get it to compile. I always missed a cap someplace. I just want
> >>>to design and test. Let the compiler take care of the niceties of
> >>>formatting. Twenty years ago C and FORTRAN were the fastest compilers
> >>>
> >>>
> >around
> >
> >
> >>>(smallest also). But, with computer speed increases, memory leaps and
> >>>bounds, not to mention hard drive extravagations, other languages can be
> >>>compiled into efficient code on an average computer.
> >>>
> >>>There are two reasons that a lot of people prefer C (C#, Java, JavaScript,
> >>>etc) that are very prevalent: 1) They already know it and don't want to
> >>>
> >>>
> >take
> >
> >
> >>>the time to get used to a different language, 2) The programming industry
> >>>has been dominated by the C industry for the last 20 years. The later
> >>>
> >>>
> >reason
> >
> >
> >>>I can fully understand for wanting to use C products. But, with the .Net
> >>>multiple language capabilities, why can't we all develop together? Why
> >>>
> >>>
> >can't
> >
> >
> >>>MS provide the same tools in the same Ide for all languages? Especially
> >>>
> >>>
> >when
> >
> >
> >>>they are language independent (XML Documentation works fine in my VB Code,
> >>>even in my VBA code).
> >>>
> >>>My problem isn't with C# developers at all, it is with the way MS forces
> >>>them to be different.
> >>>
> >>>Ken Pinard
> >>>Lost and trying to recover a bad week outside of the computer.
> >>>
> >>>
> >>>-----Original Message-----
> >>>From: Brian Russell [mailto:brian@xxxxxxxxxxxx]
> >>>Sent: Thursday, January 20, 2005 6:54 PM
> >>>To: padnug@xxxxxxxxxxxxxxx
> >>>Subject: RE: [padnug] VB vs C# is there a auto documenting feature in C#
> >>>
> >>>
> >>>Agreed, I wouldn't be as useful today if I didn't know both. I think that
> >>>is one of the strengths that I have in that I can work with VB.Net or C#
> >>>whenever I am required to. C# is my language of choice though.
> >>>
> >>>
> >>>
> >>>I will disagree on the If . End If though. I think that if you have that
> >>>many nested if statements that will cause you problems reading your code,
> >>>you have coded something wrong.
> >>>
> >>>
> >>>
> >>>Brian
> >>>
> >>>
> >>>
> >>> _____
> >>>
> >>>From: Justin Collum [mailto:justin@xxxxxxxxxxxxxxxx]
> >>>Sent: Thursday, January 20, 2005 1:04 PM
> >>>To: padnug@xxxxxxxxxxxxxxx
> >>>Subject: Re: [padnug] VB vs C# is there a auto documenting feature in C#
> >>>
> >>>
> >>>
> >>>My 2 cents here: know how to use both, since it's a pretty split world out
> >>>there. Just drop the dogma and become language-agnostic.
> >>>
> >>>But my personal preference for ASP.NET is C# because of the Java
> >>>similarities. Makes it easier to switch gears if you need to. I see good
> >>>points to both languages, but I think the good points of VB can be adapted
> >>>to C# and it's not so easy to do the reverse. I specifically like the
> >>>
> >>>
> >If...
> >
> >
> >>>End If notation; makes it easier to figure things out when there's a lot
> >>>going on. But you can pull it off with C# with code snippets.
> >>>
> >>>-- Justin
> >>>
> >>>brian@xxxxxxxxxxxx wrote:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>I will throw my 2 cents in as well.
> >>>>
> >>>>-operator overloading
> >>>>-unsafe code
> >>>>-xml comments
> >>>>-most documentation is for C# (in my opinion, not a proven fact) -more
> >>>>like Java syntax (helps when you have to pick it up and use it on a new
> >>>>project) -no line continuation characters (I hate that) -cool semi
> >>>>colons and curly braces!
> >>>>
> >>>>I have some other highly opinionated comments that I will reserve for
> >>>>Liz if she wants them off this list. There is no way I will start a
> >>>>flame war with those...lol.
> >>>>
> >>>>Brian
> >>>>
> >>>>
> >>>>
> >>>>Original Message:
> >>>>-----------------
> >>>>From: Liz Gee lizgeee@xxxxxxxxx
> >>>>Date: Thu, 20 Jan 2005 08:16:20 -0800 (PST)
> >>>>To: padnug@xxxxxxxxxxxxxxx
> >>>>Subject: [padnug] VB vs C# is there a auto documenting feature in C#
> >>>>
> >>>>
> >>>>
> >>>><html><body>
> >>>>
> >>>>
> >>>>
> >>>><tt>
> >>>>All the same pCode, but is there any reason for selecting VB or C# when
> >>>>starting a new project?<BR> I thought there was some auto documenting
> >>>>feature in C# that is not in VB.<BR> <BR> Started this new job in Sept.
> >>>>Manager wants it in VB.Net. Tried to tell him reasons for going<BR>
> >>>>C#, but didn't push it. Now the other developer of 4 yrs here wants to
> >>>>push C#, and we are<BR> supposed to come up with a justification.<BR>
> >>>><BR> SCENARIO<BR> Manager knows a bit of VB. Manager + third guy are
> >>>>old COBOL programmers.<BR> Mike and I are to write the bulk of the
> >>>>code, and all the code for the first year.<BR> <BR> Any ideas for
> >>>>justifying going C# or VB.Net?<BR> <BR> Thanks in Advance,<BR> <BR>
> >>>>=====<BR> Elizabeth Gee<BR> Information Architect<BR> <a
> >>>>href="HYPERLINK
> "<http://www.nwtd.com>http://www.nwtd.com"http://www.nwtd.com";>HYPERLINK
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>"<http://www.nwtd.com>http://www.nwtd.com"http://www.nwtd.com</a><BR>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>></tt>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>><!-- |**|begin egp html banner|**| -->
> >>>>
> >>>><br>
> >>>><tt><hr width="500">
> >>>><b>Yahoo! Groups Links</b><br>
> >>>><ul>
> >>>><li>To visit your group on the web, go to:<br><a href="HYPERLINK
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>"<http://groups.yahoo.com/group/padnug/>http://groups.yahoo.com/group/p
> adnug/"http://groups.yahoo.com/group/padnu
> >>>
> >>>
> >g/
> >
> >
> >>>">HYPERLINK
> >>>
> >>>
> >"<http://groups.yahoo.com/group/p>http://groups.yahoo.com/group/p"http://
> groups.yahoo.com/group/p
> >
> >
> >>>
> >>>
> >>>
> >>>
> >>>>adnug/</a><br>
> >>>><li>To unsubscribe from this group, send an email to:<br><a
> >>>>href="mailto:padnug-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe";>pa
> >>>>dnug
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>-
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>unsubscribe@xxxxxxxxxxxxxxx</a><br>
> >>>><li>Your use of Yahoo! Groups is subject to the <a href="HYPERLINK
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>"<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/";<
> http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/";>Yaho
> >>>
> >>>
> >o!
> >
> >
> >>>Terms of Service</a>.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>></ul>
> >>>></tt>
> >>>></br>
> >>>>
> >>>><!-- |**|end egp html banner|**| -->
> >>>>
> >>>>
> >>>></body></html>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>--------------------------------------------------------------------
> >>>>mail2web - Check your email from the web at HYPERLINK
> >>>>"<http://mail2web.com/>http://mail2web.com/";<http://mail2web.com/>http
> ://mail2web.com/ .
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>Yahoo! Groups Links
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>> _____
> >>>
> >>>Yahoo! Groups Links
> >>>
> >>>* To visit your group on the web, go to:
> >>>HYPERLINK
> >>>"<http://groups.yahoo.com/group/padnug/>http://groups.yahoo.com/group/p
> adnug/"<http://groups.yahoo.com/group/padnu>http://groups.yahoo.com/group/padnu
> >>>
> >>>
> >g/
> >
> >
> >>>* To unsubscribe from this group, send an email to:
> >>>HYPERLINK
> >>>"mailto:padnug-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe"padnug-unsu
> >>>
> >>>
> >bs
> >
> >
> >>>cribe@xxxxxxxxxxxxxxx
> >>>
> >>>* Your use of Yahoo! Groups is subject to the HYPERLINK
> >>>"<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/"Y
> ahoo! Terms of Service.
> >>>
> >>>
> >>>--
> >>>No virus found in this incoming message.
> >>>Checked by AVG Anti-Virus.
> >>>Version: 7.0.300 / Virus Database: 265.7.1 - Release Date: 1/19/2005
> >>>
> >>>
> >>>
> >>>--
> >>>No virus found in this outgoing message.
> >>>Checked by AVG Anti-Virus.
> >>>Version: 7.0.300 / Virus Database: 265.7.1 - Release Date: 1/19/2005
> >>>
> >>>
> >>>
> >>>[Non-text portions of this message have been removed]
> >>>
> >>>
> >>>
> >>>
> >>>Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >
> >
> >[Non-text portions of this message have been removed]
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG Anti-Virus.
>Version: 7.0.300 / Virus Database: 265.7.1 - Release Date: 1/19/2005
>
>
>
>----------
>Yahoo! Groups Links
> * To visit your group on the web, go to:
> *
> <http://groups.yahoo.com/group/padnug/>http://groups.yahoo.com/group/padnug/
> *
> * To unsubscribe from this group, send an email to:
> *
> <mailto:padnug-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>padnug-unsubscribe@xxxxxxxxxxxxxxx
>
>
> *
> * Your use of Yahoo! Groups is subject to the
> <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise