Prev | Current Page 351 | Next

Jon Skeet

"C# in Depth: What you need to master C# 2 and 3"

The remaining
new features of C# 2 are knocking a few rough edges off C# 1. They??™re little niggles
that the language designers decided to correct??”either areas where the language
needed a bit of improvement for its own sake, or where the experience of working
with code generation and native code could be made more pleasant.
This chapter covers
?–  Partial types
?–  Static classes
?–  Separate getter/setter property access
?–  Namespace aliases
?–  Pragma directives
?–  Fixed-size buffers
?–  Friend assemblies
184 CHAPTER 7 Concluding C# 2: the final features
Over time, Microsoft has received a lot of feedback from the C# community (and
its own developers, no doubt) about areas where C# hasn??™t gleamed quite as brightly
as it might. Although it??™s impossible to please everyone??”and in particular the value of
each feature has to be weighed against the extra complexity it might bring to the language
??”several smaller changes made it into C# 2 along with the larger ones.
None of the features in this chapter are particularly difficult, and we??™ll go through
them fairly quickly. Don??™t underestimate how important they are, however??”just
because a topic can be explored in a few pages doesn??™t mean it??™s useless. You??™re likely
to use some of these features on a fairly frequent basis. Here??™s a quick rundown of the
features covered in this chapter, so you know what to expect:
?–  Partial types??”The ability to write the code for a type in multiple source files;
particularly handy for types where part of the code is autogenerated and the
rest is written manually.


Pages:
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363