Top Banner
Programming the .NET Compact Framework Appendix A  Appendix A  Hungarian for .NET Programs Version 1.0 September 5, 2003 By: Paul Yao and David Durant Time is a software developer's most precious resource. For that reason, anything that can help save time – at any phase of the project – while maintaining or increasing productivity is a good thing. When we started to work on this book 1 , we began by collaborating on a set of standards to minimize the differences between our coding styles. As the project moved forward, we refined and updated various elements of this file. We offer this set to you, our readers, as a starting point for your own coding standards. (To get an editable copy of this file in Microsoft Word format, email [email protected].)  After the book is published, we ex pect to continue updating the various element s of this file and maintaining it on our web site (http://www.pauyao.com), and welcome your comments and suggestions. To submit a comment or suggestion, click on any hyperlink in a machine-readable version of this file. Each hyperlink is numbered, to help us understand the specific part of the document which triggered your response. For general comments, general suggestions, or new types to include, click on this link:  [Comment A.1] Goals: 1 Enhance code readability. [Comment A.2] 2 Make elements of the sample code – class es, properties, methods, events, fields – clearly distinct from those elements of the Compact Framework. [Comment A.3] 3 Work equally well in both C# and Visual Basic .NET.  [Comment A.4] 4 Establish standards which would work equally well in Compact Framework code as well as desktop .NET Framework code.  [Comment  A.5] Guidelines These standards are for a coding project that exclusively uses Microsoft's .NET technology, specifically the C# and VB .NET languages. These are, in short, 1  The books mentioned above (for the PDF version of this file) are: Programming the .NET Compact Framework in C#  and Programming the .NET Compact Framework in VB.NET , both by Paul Yao and David Durant, and both published by Addison-Wesley. © Copyright 2002 Paul Yao & David Durant 1 of 14 9/10/2003 2:24 PM  All Rights Reser ved
14

AppA HungarianForDotNETProg1rams

Jun 02, 2018

Download

Documents

Antonio Carlos
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 1/14

Programming the .NET Compact Framework Appendix A

 Appendix A Hungarian for .NET Programs

Version 1.0September 5, 2003By: Paul Yao and David Durant

Time is a software developer's most precious resource. For that reason, anythingthat can help save time – at any phase of the project – while maintaining or increasingproductivity is a good thing. When we started to work on this book1, we began bycollaborating on a set of standards to minimize the differences between our codingstyles. As the project moved forward, we refined and updated various elements of this

file. We offer this set to you, our readers, as a starting point for your own codingstandards. (To get an editable copy of this file in Microsoft Word format, [email protected].)

 After the book is published, we expect to continue updating the various elements ofthis file and maintaining it on our web site (http://www.pauyao.com), and welcome yourcomments and suggestions. To submit a comment or suggestion, click on any hyperlinkin a machine-readable version of this file. Each hyperlink is numbered, to help usunderstand the specific part of the document which triggered your response. For generalcomments, general suggestions, or new types to include, click on this link: [Comment A.1]

Goals:1 Enhance code readability. [Comment A.2] 

2 Make elements of the sample code – classes, properties, methods,events, fields – clearly distinct from those elements of the CompactFramework. [Comment A.3] 

3 Work equally well in both C# and Visual Basic .NET. [Comment A.4] 

4 Establish standards which would work equally well in CompactFramework code as well as desktop .NET Framework code. [Comment

 A.5] 

Guidelines

These standards are for a coding project that exclusively uses Microsoft's .NETtechnology, specifically the C# and VB .NET languages. These are, in short,

1 The books mentioned above (for the PDF version of this file) are: Programming the .NET

Compact Framework in C#  and Programming the .NET Compact Framework in VB.NET , both byPaul Yao and David Durant, and both published by Addison-Wesley.

© Copyright 2002 Paul Yao & David Durant 1 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 2: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 2/14

Programming the .NET Compact Framework Appendix A

recommendations that apply specifically to .NET projects. These standards were createdwith the following guidelines in mind: [Comment A.6]

•  Case Insensitive – C# is case-sensitive, but VB .NET is not. For that reason, we avoided

any convention that relied on distinguishing upper-case from lower-case names. The

single exception to this rule involves the names for constants, and for members of

enumerations, which shall be all upper-case. [Comment A.7] •  Hungarian Naming – Although this style of naming has lost favor with some, it has

always been one that we like. For that reason, our naming standard relies heavily on

Hungarian. [Comment A.8] 

•  The Visual Studio .NET forms designer suggests names, some of which can be left alone

 but others are likely to change. For example, labels on forms are given names like label1,

label2, label3, etc. In many cases, programmers have no interest in changing these. As

much as possible, the naming scheme described here works with the default names

 provided by the forms designer. [Comment A.9] 

•  Avoid terse abbreviations - both for prefixes and for variable names – in favor of making

them more meaningful. While terse names make it easier to type, the problem they create

is that they are somewhat hard to remember. For example, the name for Text Box ist ext  rather than the shorter, but less understandable, t xt . [Comment A.10] 

•  Include elements in the Compact Framework. The focus of this book is the Compact

Framework, as such we avoid naming things that are not in the Compact Framework.

Because one of the design goals of the Compact Framework was to maintain consistency

with the desktop framework, this approach means that these guidelines can be extended

as future versions of the Compact Framework become available. [Comment A.11] 

.NET Naming Standards

The Microsoft .NET documentation provides some guidelines to start with. Ofparticular interest is a section titled "Design Guidelines for Class Library Developers."This strict set of rules helps insure that new class libraries – custom controls, SQL dataadapters, etc. – are easily understandable to programmers who are already familiar with.NET conventions. You can read the details of these guidelines here: [Comment A.12]

 http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconnamingguidelines.asp.

Rather than provide the copious detail of those design guidelines, we havesummarized the key points here. This book generally follows these guidelines, with a fewexceptions which are noted later. Understanding these guidelines will help you writecode that is generally more readable and maintainable than if you did not. [Comment

 A.13]

 Type Convention Notes and Examples

Containing Elements

 Namespace [Comment A.14]s Combine the following elementstogether for namespace names in

 public libraries:

•  Company Name

•  Technology Name

Example:

Microsoft.WindowsCE.Forms

© Copyright 2002 Paul Yao & David Durant 2 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 3: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 3/14

Programming the .NET Compact Framework Appendix A

Type Convention Notes and Examples

•  Feature

•  Design

Clas [Comment A.15]s •  Use nouns or nounphrases for classes

•  For derived classes,

create compound namesfor classes by appendingbase class name at endof new class name.

Examples of nouns as class names:

•  Control, Form, TextBox

Examples of derived class names:

•  DateTextBox

•  MainForm

Contained Elements

 Attribut [Comment A.16]e •  Use suffix of "Attribute"for custom attributeclasses.

Example:HelpFileAttribute,

 AuthorAttribute

Enumeratio [Comment A.17]n •  Do not use "Enum" inname of enumeration

Examples:

•  CombineMode

•  FontStyle

•  GraphicsUnit

  Keys•  DayOfWeek

•  FileShare

Event Argument Clas [Comment A.18]s

•  Use suffix of EventArgsfor event argument class

• 

Examples:

•  RowUpdatedEventArgs

•  KeyEventArgs

•  MouseEventArgs

Event Handle [Comment A.19]r •  Use suffix of"EventHandler" for eventhandler itself

Examples:

•  TreeViewEventHandler

•  KeyEventHandler

Event Handling Metho [Comment A.20]d

•  Provide protectedmethod OnXXX whereXXX = event name

Examples:

•  OnParentChanged

•  OnRowUpdated

•  OnKeyDown•  OnMouseMove

Event Name [Comment A.21]s •  Use verbs for eventnames

Examples:

•  ParentChanged

•  EnabledChanged

•  GotFocus

•  LostFocus

Exception [Comment A.22]s •  Use suffix of "Exception"for exception names.

Examples:

•  ArithmeticException

•  DivideByZeroException

•  IndexOutOfRangeException

Interfac [Comment A.23]e •  Use prefix of "I" forinterface names.

•  Use nouns, nounphrases, or adjectivesthat describe behavior.

Examples:

•  ICollection

•  IComparer

•  IDictionary

•  IEnumerable

•  IEnumerator

•  IList

Method  [Comment A.24]s •  Use verbs or verbphrases

Examples:

•  Activate

© Copyright 2002 Paul Yao & David Durant 3 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 4: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 4/14

Programming the .NET Compact Framework Appendix A

Type Convention Notes and Examples

•  Close

•  Invoke

•  ShowDialog

Method Parameter  [Comment A.25]s

•  Use descriptiveparameter names

•  Do not use Hungariannaming

•  Use type-basedparameter namessparingly

Example:

Property [Comment A.26]

 

•  Use noun or noun phrase

•  Do not use Hungariannaming

Examples:

•  BackColor

•  Font

•  Text

•  Width

Static Field  [Comment A.27]

 

•  Use noun, noun phrases,or noun abbreviations forthe name

•  Use Hungarian naming

Examples:

Fields [Comment A.28]

 

•  Do not use Hungariannaming – good namesdescribe semantics nottype

 Hungarian Naming

Hungarian naming refers to a style of creating meaningful variable names. An MSDNTechnical Article gives this explanation for how this approach got its name: [Comment

 A.29]

"It came to be known as "Hungarian notation" because the prefixes make the variable names look

a bit as though they're written in some non-English language and because Simonyi is originally

from Hungary." – Note from Dr. Gui, November, 1999. [Comment A.30]

 

Rather than repeat all the details that are so well described in this article, here is a link toa reprint of Charles Simonyi's original white paper on this naming convention for readerswho wish to learn more: http://msdn.microsoft.com/library/en-us/dnvsgen/html/hunganotat.asp. [Comment A.31]

Hungarian naming is not a standard. In other words, you will not find an ISOstandards committee – or, for that matter, an ANSI / IEEE / ECMA committee – that

dictates what prefixes you can and cannot use. While there are many lists of suggestedprefixes – including this appendix – none claim to be the definitive one that supersedesall others. [Comment A.32]

Hungarian naming is, instead, a style. Lists (like this one) that call themselves"standards" are really just starting points for project-specific data types, because withfew exceptions every programming project has its own unique set of types. Where youget the greatest benefits from Hungarian are on projects where all agree to use thesame set of types. It provides a common language so that any team member can look atany code and understand it. [Comment A.33]

© Copyright 2002 Paul Yao & David Durant 4 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 5: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 5/14

Programming the .NET Compact Framework Appendix A

We have a friend who used to work at Microsoft. He states that the disciplined use ofHungarian naming – and a project-specific set of types and associated Hungarianprefixes – allowed him to transfer to the Excel team during a crunch period and beproductive very quickly. [Comment A.34]

This BookWe use Hungarian naming throughout this book for data types. We do so because

we find it makes our code more readable, and therefore more understandable. [Comment A.35]

The use of Hungarian also provides another important benefit: it allows you to quicklyfind names in an IntelliSense list. IntelliSense is, of course, a feature of the Visual Studio.NET text editing windows. Just about every time you type a dot operator, it pops up withpossible choices for the next part of an operation. [Comment A.36]

For example, suppose you are writing some code and need to know the name of astring variable that is a data member of the class you are writing. The "old-fashioned"way to find the variable name would be to do a search, or to scroll to the top of yoursource file (or wherever you normally put such things). When you get there, you might

find a list of string names defined like this: [Comment A.37]

st r i ng st r Fi r st Name;st r i ng st r Last Name;st r i ng st r Addr ess;s t r i ng s t rCi ty ;str i ng str St at e;st r i ng str Post al Code;

 Another alternative is to ask IntelliSense to help you. By typing

t hi s. st r

in the text editor window, you give IntelliSense enough details to help you remember thespecific name that you were looking for. Figure B-1 shows how the IntelliSense windowshowing the available data members that starts with a "st r " prefix. [Comment A.38]

Figure B-1 Hungarian Naming helps IntelliSense remind you of variable names

© Copyright 2002 Paul Yao & David Durant 5 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 6: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 6/14

Programming the .NET Compact Framework Appendix A

The “m_” Prefix for Private Data

 A variation to the Hungarian style that we adopt in this book is the use of anadditional prefix – m_  – for private class data members. This helps us instantlydistinguish public data from private data. Where it is particularly helpful is in allowing apublic property and an associated private data member with the same name – the only

difference being the private data member has the m_  prefix. Here is an example: [Comment A.39]

  pr i vat e  bool   m_bThr eadCont i nue; / / Cont i nue f l ag.

publ i c  bool   bThr eadCont i nue / / Cont i nue pr oper t y.{

get   { return  m_bThreadCont i nue; }set   { m_bThreadCont i nue = val ue; }

}

The user of this class always uses the public bThreadCont i nue property, which gets

translated into the private m_bThr eadCont i nue only visible to our class. [Comment A.40]

The Forms Designer creates private data members for you – one for each controlcreated in a form. We do not use the m_ prefix for such private data members. [Comment

 A.41]

While assembling this set of standards, the m_  prefix prompted the most discussion.We both found it useful, but wanted to make sure it would be reasonable for CompactFramework code. We found it widely used in pre-.NET technologies, including C++projects (for the MFC class library and the ATL template library), Visual Basic, and in

 Active Server Pages. [Comment A.42]

What convinced of its applicability to the Compact Framework was its use in various.NET-based technologies, including Rotor , the shared source code implementation of theCommon Language Infrastructure (CLI). We also found that the Compact Frameworkitself uses m_  for all of its private data, which are all not documented, but which become

visible with a tool like ILDASM.EXE. [Comment A.43]

Hungarian Prefixes for CTS Value Types

The Common Type System (CTS) defines a set of types that all languages mustsupport to be .NET-compatible. C# supports types outside this specification, most ofwhich are unsigned types. In the .NET documentation, these are marked as "not CLS-compliant." To enhance code portability, we non-CLS-compliant types. The followingtable includes only CLS-compliant types. [Comment A.44] 

.NET Class C# Alias Visual Basic

.NET Alias

Size Prefix

Syst em. Bool ean[Comment A.45]

bool Bool ean 1 byte b

Syst em. Char

[Comment A.46]

char Char 2 bytes ch

Syst em. Dat eTi me

[Comment A.47]

  Dat e 8 bytes dat e

Syst em. Deci mal deci mal Deci mal 16 bytes dec

© Copyright 2002 Paul Yao & David Durant 6 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 7: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 7/14

Programming the .NET Compact Framework Appendix A

[Comment A.48]

 INTEGER TYPES

Syst em. Byt e

[Comment A.49]

byt e Byt e 1 byte byt

Syst em. I nt 16

[Comment A.50]

short Short 2 bytes sh

Syst em. I nt 32

[Comment A.51]

i nt I nt eger 4 bytes i

Syst em. I nt 64

[Comment A.52]

l ong Long 8 bytes l

Platform-Specific Pointer or Handle Types

Syst em. I nt Pt r

[Comment A.53]

  4 bytes i pt r 2

FLOATING POINT TYPES

Syst em. Si ngl e[Comment A.54]

f l oat Si ngl e 4 bytes si n

Syst em. Doubl e

[Comment A.55]

doubl e Doubl e 8 bytes dbl

OTHER TYPES

Syst em. Gui d

[Comment A.56]

  16 bytes gui d

Hungarian Prefixes for System Classes [Comment A.57]

Class Prefix ExamplesCount of byt es [Comment A.59] 

cb cbRetur nBuf f er, cbLengt h

Count ofcharacters  [Comment A.60] 

cch cchMaxName, cchSearchBuf f er

EventAr gs [Comment A.61] 

e e – t he st andard event argument f or al l eventhandl er s.

Except i on [Comment A.62] 

ex ex – t he st andard except i on argument f or al lexcept i onhandl ers

I ndex f or l oops [Comment A.63] 

i i I tem, i Font , i Fi l e

Obj ect  [Comment A.64] 

obj obj DebugI nput , obj I t em, obj Col l ect i onSt ar t

Str i ng [Comment A.65] 

str str Pat h, str Fi l eName, str

2 Generally speaking, we do not use this prefix for IntPtr. Instead, we use the prefix for the type

being represented by the IntPtr variable. For example, a Win32 window handle will have a prefixof hwnd instead of iptr. This accomplishes the goal of making our code more readable and toreduce the coding errors that arise from misusing variables.

© Copyright 2002 Paul Yao & David Durant 7 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 8: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 8/14

Programming the .NET Compact Framework Appendix A

Del egate [Comment A.66] 

del e del eFi l eFound, del eAddI t em

Hungarian Prefixes for System.Text Classes

Class Prefix Examples

St r i ngBui l der  [Comment A.67] 

st rbl d st rbl dI nput Buf f er, st rbl dErr or Log

Decoder  [Comment A.68] 

decode decodeFi l eBuf f er , decodeHTML

Encoder  [Comment A.69] 

encode encodeDi spl ayBuf f er , encodeConver t

Hungarian Prefixes for System.Collection Classes

Class Prefix Examples

<Any>[Comment

 A.70]

a<t ype> i nt [ ] ai = new i nt [ 10] ; / / Ar r ay of i nt eger s.

ai [ 0] = 1;ai [ 1] = 2;

Arr ayLi st  [Comment A.71]

al <t ype> Ar r ayLi st al i = new Ar r ayLi st ( ) ; / / I nt egerAr r ayLi st

al i . Add(1) ;

al i . Add(2) ;

Bi t Ar ray [Comment A.72]

bi t ar r bi t ar r Di spl ayFl ags, bi t ar r Col l ecti onType

HashTabl e [Comment A.73]

hash hashFi l eNames, hashLef t over

Queue [Comment A.74]

queue queueSendRequest , queueWai t i ngLi st

St ack [Comment A.75]

st ack st ackFunct i onCal l , st ackUndoCommands

Hungarian Prefixes for Microsoft.Win32 Classes (Desktop Framework Only)

Class Prefix ExamplesRegi st r yKey [Comment A.76]

r egkey r egkeyRoot , r egkeySof t ware, r egkeyVer10

Hungarian Prefixes for System.Windows.Forms Classes

Class Prefix ExamplesBut t on a. k. a"Command But t on"  [Comment A.77]

cmd cmdOk – OK but t on

cmdReset – But t on t o r eset f orm

CheckBox [Comment A.78]

chk chkWor dWr ap, chkTool bar, chkCl oseWhenDone

ComboBox [Comment A.79]

combo comboSt at es, comboTaxSet t i ngs

© Copyright 2002 Paul Yao & David Durant 8 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 9: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 9/14

Programming the .NET Compact Framework Appendix A

Context Menu [Comment A.80]

cmenu cmenuMai n, cmenuOpt i ons

Cont r ol  [Comment A.81]

ctr l ctr l Parent

DataGr i d [Comment A.82]

dgr i d / / a "Data- Bound Gr i d"

dgr i dPhoneLi st

Domai nUpDown [Comment A.83]

dupdown

For m[Comment A.84]

f or m f or mMai n – mai n f or m

f r m – t emp var i abl e

<f orm used as adi al og box>

[Comment A.85]

dl g dl gFi l eOpen

dl gFi l eSave

HScr ol l Bar  [Comment A.86]

hscrol l hscrol l Li nes, hscrol l El evat i on

I mageLi st  [Comment A.87]

i l i st i l i st Fi l e, i l i st Edi t

Label  [Comment A.88]

l abel l abel 1 – def aul t l abel namel abel St at us

Li st Box [Comment A.89]

l box l boxFi l eNames

Li stVi ew [Comment A.90]

l vi ew l vi ewVi si t ors, l vi ewSympt oms

Mai nMenu [Comment A.91]

menu menuMai n, menuNew

MenuI t em

[Comment A.92]mi tem mi temFi l eOpen, mi temEdi tCopy

Numer i cUpDown [Comment A.93]

nupdown nupdownMaxI t ems, nupdownPassenger s

Panel  [Comment A.94]

panel panel Col orScrol l , panel Di scount Gr oup

Pi ct ur eBox [Comment A.95]

pbox pboxPrevi ew, pboxThumbnai l

Progr essBar  [Comment A.96]

pbar pbarDownl oad, pbarRecal c

Radi oBut t on [Comment A.97]

opt "opt " st ands f or "Opt i on but t on", as i n opt Red,opt Gr een, opt Bl ue

StatusBar  [Comment A.98]

st atus st atusMai n, st atusHel pWi ndow

 TabContr ol  

[Comment A.99]

t ab t abFi l eDi al og, t abOpt i onsDi al og

 TabPage [Comment A.100]

t page t pageOpti ons, t pageFor mat

 TextBox [Comment A.101]

t ext t extName

textF i r s t

t extPassword

 Ti mer  [Comment A.102]

t i mer t i merPowerSave

© Copyright 2002 Paul Yao & David Durant 9 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 10: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 10/14

Programming the .NET Compact Framework Appendix A

 Tool Bar  [Comment A.103]

t bar t barFi l e, t bar Opt i ons

 Tool BarBut t on [Comment A.104]

t but t on t but t onFi l eOpen, t but t onEdi t Copy

 TrackBar  [Comment A.105]

tbar tbar

 TreeVi ew [Comment A.106]

t vi ew t vwDi r ect ory

t vwOr gChar t

VScr ol l Bar  [Comment A.107]

vscrol l vscrol l Red, vscrol l Gr een, vscrol l Bl ue

Hungarian Prefixes for Microsoft.WindowsCE.Forms Classes (Windows CE only)

Class Prefix ExamplesI nput Panel  [Comment A.108]

si p si pMai n

MessageWi ndow [Comment A.109]

msgwnd msgwndText Box, msgwndSear chDone

Message [Comment A.110]

msg msgI n

Hungarian Prefixes for System.Drawing classes

Class Prefix Examples

Bi t map [Comment A.111]

bmp bmpThumb, bmpNext

Br ush [Comment A.112]

br br Red, br Gr een, br Yel l ow

Col or  [Comment

 A.113]

col or col orBl ack, col orAct i veWi ndow

Font  [Comment A.114]

f ont f ont Curr ent , f ont Ari al

Gr aphi cs [Comment A.115]

g g – St andard f or Gr aphi cs obj ect

I con [Comment A.116]

i con i conHel p, i conQuesti on, i conMai n

I mage [Comment A.117]

i mg i mgApp, i mgThumb

Pen [Comment A.118]

pen penRed, penBl ack

Poi nt  [Comment A.119]

pt pt St ar t , pt End

Poi nt F [Comment A.120]

pt f pt f Name, pt f St r i ng

Rectangl e [Comment A.121]

rect rectStory

Rectangl eF [Comment A.122]

r ectf r ectf Pr evi ew

© Copyright 2002 Paul Yao & David Durant 10 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 11: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 11/14

Programming the .NET Compact Framework Appendix A

Regi on [Comment A.123]

r eg regScrol l

Si ze [Comment A.124]

sz szBackground

Si zeF [Comment A.125]

szf szfSt r i ngSi ze

Hungarian Prefixes for System.Data. classes

Class Prefix Examples

Const rai nt Col l ecti on [Comment A.126]

 

Const r ai nt Except i on [Comment A.127]

ex

Dat aCol umn [Comment A.128] dcol

Dat aCol umnChangeEventArgs [Comment A.129]

e

Dat aCol umnChangeEventHandl er  [Comment A.130]

 

DataCol umnCol l ect i on [Comment A.131]

 

DataExcept i on [Comment A.132] ex

Dat aRel ati on [Comment A.133]  

Dat aRel at i onCol l ect i on [Comment A.134]

 

Dat aRow [Comment A.135] dr ow

Dat aRowChangeEvent Args [Comment A.136]

e

Dat aRowChangeEventHandl er  [Comment A.137]

 

DataRowCol l ect i on [Comment A.138]

 

Dat aRowVi ew [Comment A.139]  

Dat aSet  [Comment A.140] dset

DataTabl e [Comment A.141] dtab

Dat aTabl eCol l ect i on [Comment A.142]

 

DataVi ew [Comment A.143]  

Dat aVi ewManager  [Comment A.144]  

DataVi ewSett i ng [Comment A.145]  

Dat aVi ewSett i ngCol l ect i on [Comment A.146]

 

DBConcur r encyExcept i on [Comment A.147]

ex

Del etedRowI naccessi bl eExcept i on  ex

© Copyright 2002 Paul Yao & David Durant 11 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 12: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 12/14

Programming the .NET Compact Framework Appendix A

[Comment A.148]

Dupl i cat eNameExcept i on [Comment A.149]

ex

Eval uateExcept i on [Comment A.150]

ex

Fi l l Err or Event Args [Comment A.151]

e

Fi l l Er r or Event Handl er  [Comment A.152]

e

For ei gnKeyConst r ai nt  [Comment A.153]

 

I nRowChangi ngEventExcept i on [Comment A.154]

ex

I nval i dConst r ai nt Except i on [Comment A.155]

ex

I nval i dExpr essi onExcept i on [Comment A.156]

ex

Mi ssi ngPri maryKeyExcept i on [Comment A.157]

ex

NoNul l Al l owedExcept i on [Comment A.158]

ex

Propert yCol l ecti on [Comment A.159]

 

ReadOnl yExcept i on [Comment A.160]

 

RowNot I nTabl eExcept i on [Comment A.161]

ex

Stat eChangeEvent Ar gs [Comment

 A.162]

e

Stat eChangeEventHandl er  [Comment A.163]

 

Synt axEr r orExcept i on [Comment A.164]

 

Uni queConst r ai nt  [Comment A.165]  

Versi onNotFoundExcept i on [Comment A.166]

ex

Hungarian Prefixes for System.Data.SqlServerCe classes

Class Prefix ExamplesSql CeConnect i on [Comment A.167]

conn

Sql CeCommand [Comment A.168]

cmnd

Sql CeDat aReader  [Comment A.169]

drdr

Sql CeExcept i on  ex

© Copyright 2002 Paul Yao & David Durant 12 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 13: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 13/14

Programming the .NET Compact Framework Appendix A

[Comment A.170]

Sql CeEr r or  [Comment A.171]

err

Engi ne [Comment A.172]

db

Sql CeDat aAdapt er  [Comment A.173]

dapt ( whataboutsql adpt??)

Sql CeCommandBui l der  [Comment A.174]

cbl d

Hungarian Prefixes for System.IO classes

Class Prefix ExamplesFi l eSt ream

[Comment A.175]f s

Hungarian Prefixes for System.Threading classes

Class Prefix ExamplesAutoReset Event  [Comment A.176]

aut oevent

Manual Reset Event  [Comment A.177]

manevent

Mut ex [Comment A.178]

mut ex

 Thread [Comment A.179]

t hr ead

 Ti mer  [Comment A.180]

t i mer

Wai t Handl e [Comment A.181]

whand

Hungarian Prefixes for System.Xml Classes

Class Prefix Examples

NameTabl e [Comment A.182] xnt abl e

Xml At t r i but e [Comment A.183]

xattr

Xml At t r i but eCol l ecti on [Comment A.184]

xatt col l

Xml CDataSect i on [Comment A.185]

xcdatasec

Xml Char act erDat a [Comment A.186]

xchardat a

Xml Comment  [Comment A.187] xcom

© Copyright 2002 Paul Yao & David Durant 13 of 14 9/10/2003 2:24 PM All Rights Reserved

Page 14: AppA HungarianForDotNETProg1rams

8/10/2019 AppA HungarianForDotNETProg1rams

http://slidepdf.com/reader/full/appa-hungarianfordotnetprog1rams 14/14

Programming the .NET Compact Framework Appendix A

Xml Decl arat i on [Comment A.188]

xdecl

Xml Document  [Comment A.189] xdoc

Xml Document Fr agment  [Comment A.190]

xdf r g

Xml El ement  [Comment A.191] xelXml Ent i t yRef erence [Comment A.192]

xer ef

Xml I mpl ement at i on [Comment A.193]

xi mp

Xml NamedNodeMap [Comment A.194]

xnnm

Xml NamespaceManager  [Comment A.195]

xnsmanager

Xml NodeChangedEvent Args [Comment A.196]

e

Xml NodeReader  [Comment A.197]

xnr eader

Xml Parser Cont ext  [Comment A.198]

xcont ext

Xml Pr ocessi ngI nst r uct i on [Comment A.199]

xpi

Xml Qual i f i edName [Comment A.200]

xqname

Xml Resol ver  [Comment A.201] xresol ver

Xml Si gni f i cant Whi t espace [Comment A.202]

xsi gwhi t e

Xml Text  [Comment A.203]xtext

Xml Text Reader  [Comment A.204]

xtr

Xml TextWr i t er  [Comment A.205]

xt w

Xml Ur l Resol ver  [Comment A.206]

xur esol ver

Xml Whi t espace [Comment A.207]

xwhi t e

© Copyright 2002 Paul Yao & David Durant 14 of 14 9/10/2003 2:24 PM All Rights Reserved