{"id":53067,"date":"2021-09-24T03:05:27","date_gmt":"2021-09-24T03:05:27","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/09\/24\/its-discussion-l\/"},"modified":"2021-09-24T03:05:27","modified_gmt":"2021-09-24T03:05:27","slug":"its-discussion-l","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/09\/24\/its-discussion-l\/","title":{"rendered":"its discussion L"},"content":{"rendered":"<p>In your opinion, what is the biggest benefit of using an array instead of individual variables and why? <br \/>At this point, we&#8217;ve only seen how to use arrays with simple data types like integers. Once we introduce creating our own data types with classes, you&#8217;ll be able to create an array of objects that stores multiple bits of information about each item. For example, if you&#8217;re creating an application that lists gas prices by city, you can have a data type that stores the price, location, and name at each gas station. With this in mind, give an example of a data type you could create and store in an array for processing (in our gas price example, we could print out a list of prices and search to show the cheapest gas). <br \/>We covered some methods in the System.Array class this chapter. Ever wonder what that code looks like?Browse the following link to see the reference source for it&#8217;s implementation: https:\/\/referencesource.microsoft.com\/#mscorlib\/system\/array.cs <br \/>Look for the BinarySearch, Sort, and Reverse methods <br \/>Don&#8217;t be overwhelmed by everything going on in that class, but what is your initial impression and are you able to learn or find anything interesting by viewing that code? <\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In your opinion, what is the biggest benefit of using an array instead of individual variables and why? At this point, we&#8217;ve only seen how to use arrays with simple data types like integers. Once we introduce creating our own data types with classes, you&#8217;ll be able to create an array of objects that stores [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20],"class_list":["post-53067","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-programming"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/53067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/comments?post=53067"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/53067\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=53067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=53067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=53067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}