1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anna007 [38]
2 years ago
10

Create a dictionary with types as integer and string.

Computers and Technology
1 answer:
Airida [17]2 years ago
7 0

Answer:

In c#  Dictionary is the collection of keys and value .The dictionary is a generic collection class which is in the System.Collection.Generics namespace. we can represent dictionary like that Dictionary<TKey, TValue> where TKey represent the type of key and TValue is the type of TValue.

Following are the example which represent dictionary as integer and string

using System.Collections.Generic;  // namespace

class Test // class test

{

   static void Main()  // main method

   {

       

       var ob = new Dictionary< int,string>();  // type integer and string

       dictionary.Add( 2,"hello");

       dictionary.Add(143,"hello1);

       // The dictionary has 2 pairs.

       Console.WriteLine("DICTIONARY 1 " + ob.Count);

}

}

Output:

DICTIONARY 1 :2

Explanation:

In this program we create a dictionary generic class which is integer and string type after that we add the elements in the dictionary by   "dictionary.Add method " and finally print the count of dictionary

You might be interested in
What are the elements of a good study environment? Check all that apply.
finlep [7]

The elements of a good study environment are that it must be well lit the resources are near it is quite and it is clutter free

Explanation:

A good study environment must be an environment that will promote the good study conditions and it must be quite and calm if a person studies in that environment all the resources like the food water and the other refreshments must be available in that environment

The environment must be clean and it must be clutter free without any disturbances and hence these are the factors that will promote the good study environment

3 0
3 years ago
Read 2 more answers
"Bullet Lists" can be which of the following?
MariettaO [177]

Answer:

letters and numbered

Explanation:

7 0
3 years ago
Read 2 more answers
A(n) ______ database stores data in tables that consist of rows and columns.
melisa1 [442]
The answer is a spreadsheet.
4 0
3 years ago
Read 2 more answers
Application software
Crazy boy [7]

Answer:

it would be B hope this helps

Explanation:

8 0
3 years ago
Regular languages are closed under complement. True False
aivan3 [116]

Answer: True

Explanation:

A language is said to be closed under a operation here the complement is the operation then if upon application of that operation to any members of that language always yields a member of that language.

regular languages are closed under complement. A proof of the statement is

If a regular language 'L' is regular then there is a DFA X recognizing that regular language 'L'. to show that L' (compliment) is regular we need to have another DFA X' recognizing L'.

The initial state and transition function of both the DFAs are same except their accepting state. Then we can say that X' accepts L'.

So, we can say that regular languages are closed under complement.

4 0
2 years ago
Other questions:
  • Which major milestones started off the progression that led to the modern computers we play games on now? What do you think affe
    14·1 answer
  • How can people make sure they are using credit cards responsibly
    14·2 answers
  • _________ is critical to Amazon's success.<br><br> SCM<br><br> JIT<br><br> ERP<br><br> VMI
    9·1 answer
  • 1D Array Assignment Outcome: Student will demonstrate the ability to use a one-dimensional array. Student will demonstrate the a
    5·1 answer
  • )What is proceduralabstraction, and why is it important inComputer Science
    14·1 answer
  • Select the two statements below that are true. Press on the info button for
    13·1 answer
  • What are some good digital habits?
    5·2 answers
  • Jiwoo is a professional photographer. Identify and describe a photography scenario where Jiwoo would need to consider the ethics
    12·1 answer
  • Can you please help me with this crossword puzzle, I am having trouble with numbers 5 down and 22 across.
    5·2 answers
  • The area that we can see just after windows is started is subject​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!