.NET Gotchas: 75 ways to improve your C# and VB.NET programs
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Beijing u.a.
O'Reilly
2005
|
Ausgabe: | 1.ed. |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XVIII, 372 S. graph. Darst. |
ISBN: | 0596009097 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV019994662 | ||
003 | DE-604 | ||
005 | 00000000000000.0 | ||
007 | t | ||
008 | 050810s2005 gw d||| |||| 00||| eng d | ||
016 | 7 | |a 973550066 |2 DE-101 | |
020 | |a 0596009097 |c kart. : EUR 38.00 (freier Pr.), 39.95 |9 0-596-00909-7 | ||
035 | |a (OCoLC)254939225 | ||
035 | |a (DE-599)BVBBV019994662 | ||
040 | |a DE-604 |b ger |e rakddb | ||
041 | 0 | |a eng | |
044 | |a gw |c XA-DE | ||
049 | |a DE-573 |a DE-11 | ||
050 | 0 | |a QA76.625 | |
082 | 0 | |a 005.269 | |
084 | |a ST 253 |0 (DE-625)143628: |2 rvk | ||
084 | |a ST 250 C01 |2 sdnb | ||
100 | 1 | |a Subramaniam, Venkat |e Verfasser |4 aut | |
245 | 1 | 0 | |a .NET Gotchas |b 75 ways to improve your C# and VB.NET programs |c Venkat Subramaniam. [Ed.: John Osborn] |
250 | |a 1.ed. | ||
264 | 1 | |a Beijing u.a. |b O'Reilly |c 2005 | |
300 | |a XVIII, 372 S. |b graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
630 | 0 | 4 | |a Microsoft Visual BASIC |
650 | 4 | |a Microsoft dot net - Gotcha <Informatik> - Fehlererkennung - Vermeidung | |
650 | 4 | |a C# (Computer program language) | |
650 | 4 | |a Microsoft .NET Framework | |
650 | 0 | 7 | |a Microsoft dot net |0 (DE-588)4645646-6 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Fehlererkennung |0 (DE-588)4133764-5 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Gotcha |g Informatik |0 (DE-588)4833968-4 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Vermeidung |0 (DE-588)4460312-5 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Microsoft dot net |0 (DE-588)4645646-6 |D s |
689 | 0 | 1 | |a Gotcha |g Informatik |0 (DE-588)4833968-4 |D s |
689 | 0 | 2 | |a Fehlererkennung |0 (DE-588)4133764-5 |D s |
689 | 0 | 3 | |a Vermeidung |0 (DE-588)4460312-5 |D s |
689 | 0 | |5 DE-604 | |
856 | 4 | 2 | |m HEBIS Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013316495&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-013316495 |
Datensatz im Suchindex
_version_ | 1804133542517538816 |
---|---|
adam_text | NETGotchas
75 Ways to Improve Your C#
and VB NET Programs
Venkat Subramaniam
O REILLY4
Beijing • Cambridge1 • Farnham • Koln • Paris • Sebastopol • Taipei • Tokyo
Table of Contents
Preface xi
1 CLR/Framework Gotchas 1
Type alias size doesn t match what you re familiar with 1
struct and class differ in behavior 4
Returning value types from a method/property is risky 9
You can t force calls to your value-type constructors 12
String concatenation is expensive 15
Exceptions may go unhandled 18
Uninitialized event handlers aren t treated gracefully 25
Division operation isn t consistent between types 30
Typeless ArrayList isn t type-safe 34
Type GetType() may not locate all types 39
Public key reported by sn exe is inconsistent 44
2 Visual Studio and Compiler Gotchas 46
Compiler warnings may not be benign 46
Ordering of catch processing isn t consist across languages 54
Type GetType() might fail at run-time 58
rethrow isn t consistent 60
Default of Option Strict (off) isn t good 65
Versioning may lead to Serialization headaches 70
Creating Web apps can be painful 83
Naming XML documentation for IntelliSense support isn t intuitive 87
vii
3 Language and API Gotchas 89
Singleton isn t guaranteed process-wide 89
Default performance of
Data ReadXML is poor 93
enum lacks type-safety 97
Copy Constructor hampers exensibility 102
Clone() has limitations 110
Access to static/Shared members isn t enforced consistently 121
Details of exception may be hidden 124
Object initialization sequence isn t consistent 129
Polymorphism kicks in prematurely 133
Unit testing private methods is tricky 138
4 Language Interoperability Gotchas 146
Common Language Specification Compliance isn t the default 146
Optional parameters break interoperability 148
Mixing case between class members breaks interoperability 151
Name collision with keywords breaks interoperability 153
Defining an array isn t consistent 156
5 Garbage Collection Gotchas 160
Writing FinalizeO is rarely a good idea 161
Releasing managed resources in FinalizeO can wreak havoc 164
Rules to invoke base Finalize() aren t consistent 171
Depending on FinalizeO can tie up critical resources 173
Using Finalize() on disposed objects is costly 177
Implementing IDisposable isn t enough 180
Using the Dispose Design Pattern doesn t guarantee cleanup 189
6 Inheritance and Polymorphism Gotchas 192
Runtime Type Identification can hurt extensibility 192
Using new/shadows causes hideous hiding 202
Compilers are lenient toward forgotten override/overrides 205
Compilers lean toward hiding virtual methods 209
Exception handling can break polymorphism 211
Signature mismatches can lead to method hiding 218
viii Table of Contents
7 Multithreading Gotchas 223
The Thread class supports some dangerous methods/properties 223
Foreground threads may prevent a program from terminating 224
Background threads don t terminate gracefully 227
Interrupt () kicks in only when a thread is blocked 229
ThreadAbortException—a hot potato 232
Environment ExitQ brings down the CLR 235
ResetAbort() may lead to surprises 238
Abort() takes time to clean up 240
Calling Type GetType() may not return what you expect 243
Locking on globally visible objects is too sweeping 250
Threads from the thread pool are scarce 256
Threads invoked using delegates behave like background threads 260
Passing parameters to threads is tricky 263
Exceptions thrown from threads in the pool are lost 274
Accessing WinForm controls from arbitrary threads is dangerous 284
Web-service proxy may fail when used for multiple asynchronous calls 293
Raising events lacks thread-safety 299
8 COM-lnterop and Enterprise Services Gotchas 307
Release of COM object is confusing 307
Using interface pointers after calling ReleaseComObject() will fail 311
Cross-apartment calls are expensive 313
Default apartment of main thread is inconsistent across languages 318
STAThread attribute may have no effect on your methods 321
Spattering access to COM components makes code hard to maintain 325
Auto-generating GUID for your classes leads to versioning woes 327
All but one of the Classlnterface options are ineffective 332
Simply turning the switch for COM interop is dangerous 337
ServicedComponents implemented inconsistently on XP and 2003 339
AutoComplete comes with undesirable side effects 351
Appendix 357
Index 363
Table of Contents | ix
|
any_adam_object | 1 |
author | Subramaniam, Venkat |
author_facet | Subramaniam, Venkat |
author_role | aut |
author_sort | Subramaniam, Venkat |
author_variant | v s vs |
building | Verbundindex |
bvnumber | BV019994662 |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.625 |
callnumber-search | QA76.625 |
callnumber-sort | QA 276.625 |
callnumber-subject | QA - Mathematics |
classification_rvk | ST 253 |
ctrlnum | (OCoLC)254939225 (DE-599)BVBBV019994662 |
dewey-full | 005.269 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.269 |
dewey-search | 005.269 |
dewey-sort | 15.269 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
edition | 1.ed. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01981nam a2200505 c 4500</leader><controlfield tag="001">BV019994662</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">00000000000000.0</controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">050810s2005 gw d||| |||| 00||| eng d</controlfield><datafield tag="016" ind1="7" ind2=" "><subfield code="a">973550066</subfield><subfield code="2">DE-101</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0596009097</subfield><subfield code="c">kart. : EUR 38.00 (freier Pr.), 39.95</subfield><subfield code="9">0-596-00909-7</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)254939225</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV019994662</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakddb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="044" ind1=" " ind2=" "><subfield code="a">gw</subfield><subfield code="c">XA-DE</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-573</subfield><subfield code="a">DE-11</subfield></datafield><datafield tag="050" ind1=" " ind2="0"><subfield code="a">QA76.625</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.269</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 253</subfield><subfield code="0">(DE-625)143628:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250 C01</subfield><subfield code="2">sdnb</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Subramaniam, Venkat</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">.NET Gotchas</subfield><subfield code="b">75 ways to improve your C# and VB.NET programs</subfield><subfield code="c">Venkat Subramaniam. [Ed.: John Osborn]</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">1.ed.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Beijing u.a.</subfield><subfield code="b">O'Reilly</subfield><subfield code="c">2005</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XVIII, 372 S.</subfield><subfield code="b">graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="630" ind1="0" ind2="4"><subfield code="a">Microsoft Visual BASIC</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Microsoft dot net - Gotcha <Informatik> - Fehlererkennung - Vermeidung</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">C# (Computer program language)</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Microsoft .NET Framework</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Microsoft dot net</subfield><subfield code="0">(DE-588)4645646-6</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Fehlererkennung</subfield><subfield code="0">(DE-588)4133764-5</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Gotcha</subfield><subfield code="g">Informatik</subfield><subfield code="0">(DE-588)4833968-4</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Vermeidung</subfield><subfield code="0">(DE-588)4460312-5</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Microsoft dot net</subfield><subfield code="0">(DE-588)4645646-6</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Gotcha</subfield><subfield code="g">Informatik</subfield><subfield code="0">(DE-588)4833968-4</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="2"><subfield code="a">Fehlererkennung</subfield><subfield code="0">(DE-588)4133764-5</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="3"><subfield code="a">Vermeidung</subfield><subfield code="0">(DE-588)4460312-5</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HEBIS Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013316495&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-013316495</subfield></datafield></record></collection> |
id | DE-604.BV019994662 |
illustrated | Illustrated |
indexdate | 2024-07-09T20:10:22Z |
institution | BVB |
isbn | 0596009097 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-013316495 |
oclc_num | 254939225 |
open_access_boolean | |
owner | DE-573 DE-11 |
owner_facet | DE-573 DE-11 |
physical | XVIII, 372 S. graph. Darst. |
publishDate | 2005 |
publishDateSearch | 2005 |
publishDateSort | 2005 |
publisher | O'Reilly |
record_format | marc |
spelling | Subramaniam, Venkat Verfasser aut .NET Gotchas 75 ways to improve your C# and VB.NET programs Venkat Subramaniam. [Ed.: John Osborn] 1.ed. Beijing u.a. O'Reilly 2005 XVIII, 372 S. graph. Darst. txt rdacontent n rdamedia nc rdacarrier Microsoft Visual BASIC Microsoft dot net - Gotcha <Informatik> - Fehlererkennung - Vermeidung C# (Computer program language) Microsoft .NET Framework Microsoft dot net (DE-588)4645646-6 gnd rswk-swf Fehlererkennung (DE-588)4133764-5 gnd rswk-swf Gotcha Informatik (DE-588)4833968-4 gnd rswk-swf Vermeidung (DE-588)4460312-5 gnd rswk-swf Microsoft dot net (DE-588)4645646-6 s Gotcha Informatik (DE-588)4833968-4 s Fehlererkennung (DE-588)4133764-5 s Vermeidung (DE-588)4460312-5 s DE-604 HEBIS Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013316495&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Subramaniam, Venkat .NET Gotchas 75 ways to improve your C# and VB.NET programs Microsoft Visual BASIC Microsoft dot net - Gotcha <Informatik> - Fehlererkennung - Vermeidung C# (Computer program language) Microsoft .NET Framework Microsoft dot net (DE-588)4645646-6 gnd Fehlererkennung (DE-588)4133764-5 gnd Gotcha Informatik (DE-588)4833968-4 gnd Vermeidung (DE-588)4460312-5 gnd |
subject_GND | (DE-588)4645646-6 (DE-588)4133764-5 (DE-588)4833968-4 (DE-588)4460312-5 |
title | .NET Gotchas 75 ways to improve your C# and VB.NET programs |
title_auth | .NET Gotchas 75 ways to improve your C# and VB.NET programs |
title_exact_search | .NET Gotchas 75 ways to improve your C# and VB.NET programs |
title_full | .NET Gotchas 75 ways to improve your C# and VB.NET programs Venkat Subramaniam. [Ed.: John Osborn] |
title_fullStr | .NET Gotchas 75 ways to improve your C# and VB.NET programs Venkat Subramaniam. [Ed.: John Osborn] |
title_full_unstemmed | .NET Gotchas 75 ways to improve your C# and VB.NET programs Venkat Subramaniam. [Ed.: John Osborn] |
title_short | .NET Gotchas |
title_sort | net gotchas 75 ways to improve your c and vb net programs |
title_sub | 75 ways to improve your C# and VB.NET programs |
topic | Microsoft Visual BASIC Microsoft dot net - Gotcha <Informatik> - Fehlererkennung - Vermeidung C# (Computer program language) Microsoft .NET Framework Microsoft dot net (DE-588)4645646-6 gnd Fehlererkennung (DE-588)4133764-5 gnd Gotcha Informatik (DE-588)4833968-4 gnd Vermeidung (DE-588)4460312-5 gnd |
topic_facet | Microsoft Visual BASIC Microsoft dot net - Gotcha <Informatik> - Fehlererkennung - Vermeidung C# (Computer program language) Microsoft .NET Framework Microsoft dot net Fehlererkennung Gotcha Informatik Vermeidung |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013316495&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT subramaniamvenkat netgotchas75waystoimproveyourcandvbnetprograms |