| Chapter: 1
Developing applications that use system types and collections |
|---|
| Type casting
Type casting is the process of converting the value of a specific data type into another data type. There are two types of casting in .NET, i.e., implicit and explicit. |
| Array
An array of data is declared by using a value data type with square braces and a variable name in which the array of data is to be stored. |
| params
The params keyword provides the facility to specify a method parameter that takes a variable number of arguments. |
| Boxing
Boxing is an implicit conversion of a value type to a reference type. Unboxing is the inverse of boxing. |
| static
Variables that have only one copy per class are known as static variables. They are not attached to a particular instance of a class but rather belong to a class as a whole. |
| Value type
A value type is a variable that contains data values, which are stored in a memory storage area known as the stack. |
| + operator
The + operator concatenates two strings, and as a result, produces a new String object. It may also be used to concatenate a string with other data types. |
| ToString(), GetType(), and Equals()
The ToString(), GetType(), and Equals() methods are available in all the classes of .NET Framework. |
| Short datatype
The Short datatype is stored as a signed 16-bit (2-byte) integer ranging in value from -32,768 to 32,767. It is also stored as an unsigned 16-bit (2-byte) integer ranging value from 0 to 65,535. |
| Enumeration
Enumeration is used to provide symbols to a fixed set of related data values. Therefore, developers can use red, green, or blue, etc. instead of values such as 1, 2, or 3, etc. |
| Finally
A finally block is used to execute a certain portion of code that must be executed, irrespective of whether or not an exception is caught. |
| unsafe
The unsafe keyword is used in case of pointers in C#. The unsafe keyword denotes an unsafe code or block, which is required for any operation involving pointers. |
| Property
Each class is made up of properties, methods, and events. Property is a named attribute of an object. Properties define the characteristics of an object, such as name. |
| Constructor
A constructor is used to create an object that is an instance of a class. It has the same name as the class in which it resides. |
| Destructor
A destructor is a special type of method used to destroy instances of a class when they are no longer used by an application. A destructor has the same name as the class in which it resides, preceded by a tilde (~) symbol. |
| Runtime environment
The .NET Framework provides the development and runtime environment for .NET applications. It is composed of several components that are required to build and run .NET-based applications. |
| Logical errors
Logical errors are those errors that appear in an application once it is in use. An application with logical errors compiles and executes correctly. However, it does not produce the desired result. |
| Array in C#
When declaring an array in Visual C# .NET, only the upper bound of the array is defined. Arrays in Visual C# .NET are always zero-based, i.e., the lower bound is always zero. |
| Exception
The common language runtime throws an exception when an error occurs during program execution resulting from a failed runtime check. This error is usually nonfatal and is recoverable by user programs. |
| Class
A class is a reference type, and its object is created on the heap. On the other hand, a structure is a value type, and its object is created on the stack. |
| Pre and Postfix
Use Pre and Post fix operators such as –, ++, etc to change the values of variables. |
| Method
A user defined class that inherits abstract class and method. |
| Abstract
An abstract method only has a semicolon after the method name and parenthetical argument list. The subclasses provide the body of the abstract method. |
| Inheritance
Use inheritance feature of .NET in an application and define an abstract class that contains a declaration of an abstract method. |
| Button click event
Use the button click event to change the back color of the form according to the choice of a user without exception handling. |
| StartPosition
The StartPosition property of the form is used to display it at the center of the screen. |
| Random class
The Random class is used to change the back color of the form in random order whenever you click the button. |
| Dock property
The Dock property is used to cover the complete form. |
| ContextMenu
Add a ContextMenu control in an application and use the Show() method of the ContextMenu to display in the application. |
| Try
A try block must be followed by a catch block or a finally block. |
| Default constructors and explicit constructors Create and use default constructors and explicit constructors in an application. |
| ICollection interface The ICollection interface is implemented by all collections to provide the CopyTo() method as well as the Count, IsSynchronized, and SyncRoot properties. It is used to define size, enumerators, and synchronization methods for all non-generic collections. |
| SortedList and BitArray collections
The SortedList and BitArray collections are accessed by an index. |
| IComparer and IComparable interfaces
The IComparer and IComparable interfaces are used to sort a collection using the Array.Sort method. |
| System.Collections and System.Collections.Generic namespaces
The following collections are available in both the System.Collections namespace and System.Collections.Generic namespace:
|
| DictionaryEntry object
The DictionaryEntry object is used to store entries in a Hashtable collection. |
| IEnumerable and IDictionaryEnumerator interfaces
The IEnumerable and IDictionaryEnumerator interfaces are used to create a new collection type that must be iterated using a for each loop. |
| IClassFactory interface
The IClassFactory interface deals with two issues: locality and language independence. It provides a language-neutral way to create a COM object by a client. |
| AddRange
The AddRange method of the Control.ControlCollection class is used to add an array of controls to a collection. It is also used to add a single control to a collection. |
| ArrayList
The ArrayList class of the System.Collections namespace implements the IList interface by using an array of data. |
| SortedList object
It adds names to a SortedList object and retrieves the index number of a name. |
| Hashtable object
It retrieves values to their corresponding keys stored in a Hashtable object. |
| Dequeue
The Dequeue method of the Queue class is used to retrieve as well as remove an item at the beginning of a queue. |
| IsValid
The IsValid property of the CustomValidator control is used to indicate whether or not an input control passes validation. |
| LinkedList The LinkedList |
| LinkedList.Enumerator
The LinkedList.Enumerator is used to read all the data of a generic LinkedList. The LinkedList Generic class is a doubly linked list. It is created dynamically as per the requirements. It comprises a sequence of nodes, each node in the LinkedList Generic class contains a data field and one or two references pointing to the next and/or the previous node. |
| Ngen.exe
If an application calls a large number of methods or large shared libraries at startup, using pre-compilation is the best technique to optimize the performance of the application during startup. Pre-compiling the application with Native Image Generator (Ngen.exe) reduces its startup time. |
| CompareTo
The CompareTo method of the IComparable generic interface returns a 32-bit signed integer value that indicates the relative order of the objects that is to be compared. |
| StringDictionary
The StringDictionary class is used to store key and value pairs. When you create an instance of the specialized StringDictionary class, you can use only string indexes and set only values that are strings. |
| BitVector32 structure
The BitVector32 structure is used to provide a simple structure that stores boolean values and small integers in a 32-bit of memory size. |
| “= =” and Equals()
If two strings are equivalent, the “==” returns true, also the “Equals()” method returns true. When you use “==” operator with the string class it compares value rather than the identity. |
| Hybrid Dictionary
It manages collections and selects a class that is optimized for key-based item retrieval from both small and large collections using Hybrid Dictionary. |
| String concatenation
It is used to gather data from multiple email messages and format the data for display on the page and ensure that the page displays the data as quickly as possible. |
| Interface
An interface describes a group of related behaviors that can belong to a class or a struct. |
| Array.Sort and IComparer
Create a new collection type that must be sorted by using the Array.Sort and IComparer interface. |
| IConvertable interface
It converts the value of an object of an implementing type into a Common Language Runtime (CLR) type that has an equivalent value by using IConvertable interface. |
| EventArgs class
Create a class that inherits from the EventArgs class to pass specialized information to an event handler apart from the source and event handler objects. |
| Multiple events can share the same delegate
Multiple events can share the same delegate type. Once a delegate type is declared for an event, the event is declared as a delegate type field. |
| StackTrace
The StackTrace property is used to trace a stack at runtime. It is an ordered collection of one or more stack frames. |
| Event
A custom event can invoke a delegate. |
| PrintPageEventArgs
The PrintPageEventArgs class is used to provide data for the PrintPage event and it occurs when the output for the current page is needed. |
| EditCommand event
The EditCommand event of the DataGrid control occurs when users click the Edit button for a DataGrid item. The EditItemIndex property of the DataGrid control specifies the index of an item in the DataGrid control to edit. |
| TextBox event
The TextBox event handler is used to execute when the TextChanged event of the TextBox is raised. The TextChanged event of the TextBox control occurs when the Text property value is changed. |
| TextChanged event
When the TextChanged event of a TextBox control is fired, the text typed in one TextBox control will also appear in another TextBox control. |
hello there and thank you for your info – I’ve certainly picked up something new from right here. I did however expertise several technical points using this website, as I experienced to reload the website lots of times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I’m complaining, but sluggish loading instances times will often affect your placement in google and can damage your high quality score if ads and marketing with Adwords. Well I’m adding this RSS to my email and could look out for a lot more of your respective interesting content. Ensure that you update this again very soon..
We’re a group of volunteers and starting a new scheme in our community. Your site offered us with valuable info to work on. You’ve done an impressive job and our whole community will be grateful to you.
Thanks , I’ve recently been searching for info about this subject for ages and yours is the best I’ve discovered till now.But, what about the bottom line? Are you sure about the source?
Hello my friend! I wish to say that this post is amazing, nice written and include almost all significant infos. I would like to see more posts like this .
Hello, i think that i saw you visited my blog so i came to “return the favor”.I am attempting to find things to enhance my site!I suppose its ok to use a few of your ideas!!
My spouse and i got very fortunate when Michael managed to round up his preliminary research using the ideas he came across while using the site. It is now and again perplexing to simply be releasing tricks the others might have been making money from. And we also figure out we have you to appreciate because of that. The entire illustrations you’ve made, the straightforward website navigation, the friendships you give support to create – it’s many incredible, and it is leading our son and the family reason why this matter is fun, which is very important. Many thanks for the whole lot!
This is very interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your excellent post. Also, I have shared your site in my social networks!
Nice post. I was checking constantly this blog and I’m impressed! Extremely useful info specifically the last part
I care for such information much. I was seeking this particular information for a very long time. Thank you and best of luck.
you’re really a good webmaster. The website loading speed is incredible. It seems that you are doing any unique trick. Furthermore, The contents are masterpiece. you have done a wonderful job on this topic!
Hi my friend! I want to say that this article is awesome, nice written and include almost all significant infos. I’d like to see more posts like this .
What i don’t realize is actually how you are not really much more well-liked than you might be right now. You are so intelligent. You realize therefore considerably relating to this subject, produced me personally consider it from numerous varied angles. Its like women and men aren’t fascinated unless it’s one thing to do with Lady gaga! Your own stuffs nice. Always maintain it up!
I like the valuable info you provide in your articles. I will bookmark your blog and check again here frequently. I am quite sure I will learn many new stuff right here! Best of luck for the next!
Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a bit, but instead of that, this is wonderful blog. A fantastic read. I will certainly be back.
What i do not realize is actually how you’re not really much more well-liked than you may be right now. You are so intelligent. You realize therefore considerably relating to this subject, produced me personally consider it from a lot of varied angles. Its like men and women aren’t fascinated unless it’s one thing to accomplish with Lady gaga! Your own stuffs excellent. Always maintain it up!
Wow, incredible blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is wonderful, as well as the content!
I appreciate, cause I found just what I was looking for. You’ve ended my 4 day long hunt! God Bless you man. Have a nice day. Bye
What i don’t realize is actually how you’re not really much more well-liked than you may be now. You are very intelligent. You realize therefore significantly relating to this subject, made me personally consider it from a lot of varied angles. Its like men and women aren’t fascinated unless it is one thing to accomplish with Lady gaga! Your own stuffs nice. Always maintain it up!
I wish to voice my passion for your kind-heartedness supporting those people that should have help on the topic. Your real commitment to getting the message all around has been particularly insightful and has consistently made guys and women much like me to attain their ambitions. Your own interesting tutorial entails a lot to me and additionally to my colleagues. Thanks a ton; from each one of us.
I simply wanted to thank you very much again. I’m not certain what I could possibly have created in the absence of these tips contributed by you directly on such a industry. Previously it was a very scary condition for me, nevertheless being able to see the very professional manner you resolved that made me to cry with delight. I will be happy for the service and even hope you recognize what a great job your are getting into training men and women through your webpage. Most probably you haven’t come across any of us.
Hi there, I found your web site via Google while looking for a related topic, your web site came up, it looks good. I’ve bookmarked it in my google bookmarks.
Hello there, You’ve done an incredible job. I will certainly digg it and personally recommend to my friends. I’m confident they’ll be benefited from this web site.
We’re a group of volunteers and starting a new scheme in our community. Your site offered us with valuable information to work on. You’ve done a formidable job and our whole community will be grateful to you.
Thank you for another magnificent article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information.
I have read several good stuff here. Certainly worth bookmarking for revisiting. I wonder how much effort you put to create such a great informative site.
I’m just writing to let you know of the perfect discovery my friend’s child went through reading your webblog. She noticed too many pieces, with the inclusion of how it is like to possess an ideal coaching heart to have the mediocre ones without problems know just exactly specified problematic things. You undoubtedly exceeded our desires. Many thanks for presenting those good, trustworthy, edifying and in addition fun thoughts on your topic to Sandra.
Thanks so much for giving everyone an exceptionally superb possiblity to read from this web site. It is often very kind and full of a good time for me and my office peers to visit your website more than thrice per week to find out the latest items you will have. And of course, I am actually astounded with the superb techniques you give. Selected 2 points in this article are in fact the most efficient I have ever had.
Wow! Everything I needed written in a very brief way. In my opinion it’s the most excellent text I have ever seen. Well done!
Hi, i think that i saw you visited my website so i came to “return the favor”.I’m trying to find things to enhance my site!I suppose its ok to use a few of your ideas!!
Thanks a lot for sharing this with all of us you actually know what you are talking about! Bookmarked. Please also visit my site =). We could have a link exchange contract between us!
You can certainly see your skills in the work you write. The world hopes for more passionate writers like you who aren’t afraid to say how they believe. Always go after your heart.
This is very interesting, You’re a very skilled blogger. I’ve joined your rss feed and look forward to seeking more of your excellent post. Also, I’ve shared your site in my social networks!
It is really a nice and useful piece of info. I’m glad that you shared this helpful info with us. Please keep us up to date like this. Thanks for sharing.
Thank you for another magnificent article. Where else could anyone get that type of info in such a perfect way of writing? I’ve a presentation next week, and I am on the look for such info.
You actually make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complicated and extremely broad for me. I’m looking forward for your next post, I’ll try to get the hang of it!
whoah this blog is great i love reading your posts. Keep up the good work! You know, many people are hunting around for this information, you can aid them greatly.
hey there and thank you for your info – I have definitely picked up anything new from right here. I did however expertise several technical points using this web site, as I experienced to reload the web site many times previous to I could get it to load correctly. I had been wondering if your web hosting is OK? Not that I’m complaining, but slow loading instances times will sometimes affect your placement in google and can damage your high quality score if ads and marketing with Adwords. Anyway I’m adding this RSS to my email and could look out for a lot more of your respective intriguing content. Ensure that you update this again very soon..
I’m not sure where you are getting your information, but great topic. I needs to spend some time learning much more or understanding more. Thanks for magnificent information I was looking for this information for my mission.
whoah this blog is magnificent i love reading your articles. Keep up the great work! You know, many people are hunting around for this information, you could aid them greatly.
Thank you for another fantastic article. Where else could anyone get that type of information in such an ideal way of writing? I’ve a presentation next week, and I am on the look for such info.
I’m really impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Anyway keep up the nice quality writing, it’s rare to see a nice blog like this one today..
Hello there, You have done a great job. I’ll definitely digg it and personally suggest to my friends. I am sure they’ll be benefited from this website.
obviously like your website but you have to check the spelling on quite a few of your posts. Many of them are rife with spelling problems and I find it very bothersome to tell the truth nevertheless I will definitely come back again.
Hello my friend! I wish to say that this article is amazing, nice written and include almost all important infos. I would like to see more posts like this .
Thanks for another informative site. Where else could I get that type of info written in such an ideal way? I’ve a project that I’m just now working on, and I’ve been on the look out for such info.
What i don’t understood is actually how you are not actually much more well-liked than you might be now. You are so intelligent. You realize thus significantly relating to this subject, made me personally consider it from a lot of varied angles. Its like women and men aren’t fascinated unless it’s one thing to do with Lady gaga! Your own stuffs nice. Always maintain it up!
Someone essentially help to make seriously posts I would state. This is the very first time I frequented your website page and thus far? I surprised with the research you made to make this particular publish incredible. Great job!
Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how can we communicate?
I’ve been exploring for a little for any high quality articles or blog posts on this kind of area . Exploring in Yahoo I at last stumbled upon this website. Reading this info So i am happy to convey that I’ve a very good uncanny feeling I discovered just what I needed. I most certainly will make sure to do not forget this web site and give it a look on a constant basis.