1. Collection Initializer. To initialize a dictionary, we can enclose each set of key-value in curly braces. Internally for each pair, the compiler makes a call to Dictionary’s Add () method. This is demonstrated below: 2. Index Initializer. We can also initialize a dictionary using an index initializer, as shown below. Internally, it uses ...
Answer: Use the indexOf () Method. You can use the indexOf () method to check whether a given value or element exists in an array or not. The indexOf () method returns the index of the element inside the array if it is found, and returns -1 if it not found. Let's take a
you have to initialize your store object first.Use like below