fat-client applications, 22, 24
FieldName attribute example
AttributeUsage attribute, 307–309
code listing, 307
specifying optional parameters, 309–310
specifying required parameters, 309
fields (member variables). See also properties
accessing instance fields outside the class, 38
accessing static fields outside the object, 37–38
casing of, 76–77
as data members of classes, 85
defined, 85
marking unsafe, 206
pointers to, 212–214
public, in structs, 102
readonly fields, 99–101
scope, 35
scope clashes for local variables and, 37–38
usage conventions, 81
FIFO (First In Last Out) structure
Queue class, 256
Queue<T> generic class, 283
file associations, setting with ClickOnce, 571
File class
Copy() method, 1197
Delete() method, 1197
described, 1188
FileInfo class versus, 1189
Move() method, 1197
file management. See file system operations
File System Editor (ClickOnce), 570
file system operations. See also specific classes
buffered streams, 1207
classes for, 1188
file browser example, 1192–1197
file security, 1187, 1222–1226
FilePropertiesAndMovement application, 1197–1201
moving and deleting folders, 1197
moving, copying, and deleting files, 1197–1201
namespace for, 1187
reading and writing to binary files, 1208–1213
reading and writing to text files, 1213–1219
reading from files, 1201, 1202–1204
streams, 1205–1207
writing to files, 1201, 1204–1205
File Types Editor (ClickOnce), 571
FileInfo class
CopyTo() method, 1197
Delete() method, 1197
described, 1188
Exists property, 1189–1190
File class versus, 1189
instantiating, 1189
methods, 1191–1192
MoveTo() method, 1197
properties, 1190, 1191
streams versus, 1206
FileProperties application
ClearAllFields() method, 1194
currentFolderPath member field, 1194
DisplayFileInfo() method, 1194–1195, 1196
DisplayFolderList() method, 1195, 1196, 1197
event handlers, 1195–1197
events, 1194
overview, 1192–1193
using statements, 1193–1194
FilePropertiesAndMovement application
ClearAllFields() method, 1201
controls, 1198
DisableMoveFeatures utility function, 1201
DisplayFolderList() method, 1200–1201
enabling and disabling controls, 1200
event handlers, 1199–1200
overview, 1197–1198
FileStream class
BinaryFileReader application, 1210–1213
closing streams, 1209
constructors, 1208–1209
described, 1207
enumerations, 1208
information required for instantiating, 1208
reading data, 1209
StreamReader class with, 1215
StreamWriter class with, 1216
writing data, 1209–1210
FileSystemInfo class, 1188
Finalize() method
for compiled destructors, 199, 200
described, 107, 108
finalizers (destructors)
in C++ versus C#, 200
defined, 86
as Dispose() method backup, 202–203
overview, 199–200
performance and, 200
syntax, 200
finally blocks
defined, 330
error trapping process and, 330
MortimerColdCall example, 343
omitting, 331
for releasing database resources, 586, 587–588
in SimpleExceptions class, 334
syntax, 331
throwing exceptions from, 339
Find() method (List<T> generic class), 280
FindAll() method (List<T> generic class), 280
finding message queues, 1103–1104
First In Last Out (FIFO) structure
Queue class, 256
Queue<T> generic class, 283
fixed keyword for pointers, 213–214
float type
converting integers to, 159–162
overview, 42
floating-point types, 42. See also specific types
flow control. See also specific statements
conditional statements, 47–51
jump statements, 54–55
loops, 51–54
FlowLayoutPanel control (Windows Forms), 774–775
focus, gaining and losing for controls, 761
folders or directories. See also file system operations
configuring for assemblies, 460–462
defined, 1188
securing with ASP.NET, 971–973
FolderTree custom control (Windows Forms)
adding an image for Toolbox display, 794
adding properties for handling files and folders, 791–792
deriving from TreeView control, 789
FileNode class for loading files, 789–790
FolderNode class for loading folders, 789, 790–791
further enhancements possible for, 794
initializing file system loading, 792–794
testing the control, 794
Font class
Height property, 879–880
overview, 877
FontFamily class, 877, 879
fonts and font families
classes for, 877
defined, 876
enumerating font families, 878–880
measuring size of text, 876
selecting fonts, 877
terminology, 876–877
for statements
overview, 51–53
scope of local variables declared in, 36–37
ForEach() method (List<T> generic class), 281
foreach statements
iterating through collections with, 54, 246
overview, 54
for reading Stack values, 254
as syntactical shortcuts, 248
Form class
application example using, 752
closing forms, 782
controlling appearance of forms, 784–786
FormBorderStyle property, 785
Icon property, 785
inheritance from Control class, 780
initialization, 781
instantiating, 781
Invalidate() method, 884–886
methods for keyboard events, 891
methods for mouse events, 890
properties relating to form startup, 782
setting colors for forms, 785
Show() method, 782
ShowDialog() method, 782–784
ShowInTaskbar property, 782
system menu and, 784–785
user interaction with, 782–784
visibility of forms and, 781, 782
Format() method (String class), 231
formatter provider (.NET Remoting), 1012, 1047–1048
formatters
Message Queuing, 1107–1108
.NET Remoting, 1012, 1025
formatting expressions
format specifiers, 230
FormatVector example, 233–235
how strings are formatted, 231–233
interfaces for, 223
need for, 229
FormatVector struct, 233–235
forms. See Web Forms; Windows Forms
FormView control, 936, 937–938
FromFile() method (Image class), 871
FTP, as high-level protocol, 1262
function pointers, 171. See also delegates
functions. See also constructors; finalizers (destructors); methods; properties
abstract, 117
association with class required for, 86
calling base versions, 116–117
defining for structs, 101–102
function members of classes, 85–86
methods versus, 86
overview, 86
standard function calls, 78–80
future of distributed programming. See WCF; Web services specifications