Posts

Showing posts with the label C# for Beginner

C# Tutorial for Beginner : Chapter 10 Array 2-Dimension

Image
Introduction An array monitors various snippets of data in single line order, a one-dimensional record list. Notwithstanding, the information related with specific frameworks (an advanced picture, a tabletop game, and so forth.) lives in two measurements. To picture this information, we require a multi-dimensional information structure, that is, a multi-dimensional array. A two-dimensional array is extremely simply an array of arrays (a three-dimensional array is an array of arrays of arrays). The accompanying declaration makes a two-dimensional array of four lines and two segments. float[,] numbers = new float[3, 20]; Example Explanation  To make you more understand to this 2-dimension array, follow this example. Given a 2 dimensional array with size 6x6 as shown below. This array is illustrated with rows and columns. The first dimension is like a line and a second dimension is like a column Array 6 x 6 We focus on the position of the blue array Focusing Ar...

Binary to Decimal Conversion and Vice Versa with Illustration and Example

Image
Introduction Radix is a Latin word for "root". Root can be considered a synonym for base in the arithmetical sense. In mathematical numeral systems, the radix or base is the quantity of one of a kind digits, including zero, used to render to numbers in a positional numeral system. For instance, in the base-10 or decimal number framework (the most well-known framework being used today), there is an aggregate of 10 digits utilized (0,1,2,3,4,5,6,7,8,9), thusly, its radix is 10. In the base-2 or binary number framework (utilized inside by almost all PCs), there are two numbers utilized (0, 1), so its radix is two. Different words that are synonymous with radix are base and root, in a arithmetic sense.  In any standard positional numeral system, a number is traditionally composed as (x) y with x as the series of digits and y as its base, in spite of the fact that for base ten the subscript is normally expected (and discarded, together with the match of enclosures), a...

C# Tutorial for Beginner : Chapter 9 Recursion

Image
Introduction A recursive function is a function which either calls itself or is in a potential loop of function calls. This empowers the function to rehash itself a few times, yielding the outcome and the finish of every iteration. In modern programming languages, if a program enables you to call a function inside a similar function, at that point it is known as a recursive call of the function. Why I mention modern programming language ? It because some old languages do not support recursive. I don't know COBOL does (it unquestionably didn't at one time), however I can't exactly envision anyone minding much either. Fortran 77 does not allow recursion but it is allowed since Fortran 90, yet requires that you utilize the recursive keyword to reveal to it that a subroutine is recursive. PL/I was essentially the same - recursion was bolstered, however you needed to unequivocally let it know what procedures were recursive. I question there are numerous more than that how...

C# Tutorial for Beginner : Chapter 8 Dictionary

Image
Introduction Dictionary in C# is same as language dictionary. Each language dictionary is a collection of words and their definitions, regularly recorded one after another in order in at least one particular dialects. Similarly, the Dictionary in C# is a collection of Keys and Values, where key resembles word and value resembles definition. The key is indistinguishable in a key-value match and it can have at most one value in the dictionary, however a value can be related with a wide range of keys. This class is characterized in the System.Collections.Generic namespace, so you should import or utilizing System.Collections.Generic namespace. Dictionary<TKey, TValue> is a generic collection where TKey means the type of key and TValue is the sort of value. Perhaps you might heard other collection about "List" or "Hashtable" before. Is there the difference between  them ? Of course there is, although "List", "Hashtable", "Dictionary...

C# Tutorial for Beginner : Chapter 7 Single-Dimension Array

Image
Introduction An array keeps a settled size consecutive group of elements of a similar type. An array is utilized to keep a group of information, however it is regularly more valuable to think about an array as an accumulation of variables of a similar type put away at bordering memory areas. Rather than pronouncing singular variable which somehow make your code become messy, for example, value0, value1, ..., until value100, you proclaim one array variable, for example, numbers and utilize value[0], value[1], and ..., value[100] to speak to singular factors. A particular element in an array is gotten to by a record. All arrays comprise of bordering memory areas. The most minimal deliver relates to the first element and the most noteworthy deliver to the last element.Okay, in this post, I will explain single-dimension array. If there single then there must be double or more, right ? Of course there more other type than single-dimension. I will discuss the other in future post. Now,...

C# Tutorial for Beginner : Chapter 6 Looping

Image
INTRODUCTION You can make loops by utilizing the emphasis statements. Emphasis statements make inserted statements be executed various circumstances, subject to the circle end criteria. These statements are executed all together, with the exception of when a bounce explanation is experienced. By utilizing a loop, you can run a statement or a block of statements more than once until the point that a predefined articulation assesses to false. This sort of loop is helpful for emphasizing over arrays and for different applications in which you know ahead of time how often you need the loop to repeat. In C#, they come in 4 distinct variations, and we will observe every last one of them. Before I explain each one of them, let me give you a flowchart followed by code implementation. Then I will give the analysis from the code. Flowchart As you can see, The main method is the blue one. This is simple program which show you basic mathematics operation. Each operation use different typ...