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]
3 years ago
10

Create a dictionary with types as integer and string.

Computers and Technology
1 answer:
Airida [17]3 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
High-level languages must be translated into machine language before they can be executed. _________________________
Rufina [12.5K]
High-level language programs must be translated into machine language before they can be executed. (Machine language instructions are encoded as binary numbers that are meant to be used by a machine, not read or written by people. The Java compiler translates Java programs into a language called Java bytecode.
4 0
3 years ago
Desktop publishing design tools are represented by A. icons. B. windows. C. trackballs. D. modems.
AnnZ [28]
The best answer is A
Windows are the screens you can maximize and minimize.
Trackballs make the mouse move.
Modems are associated with internet connection.
Those three answers are unrelated leaving icons to be the most reasonable.
3 0
3 years ago
True or false A ClassB fire involves live electrical equipment
MAVERICK [17]
This is false. A Class B fire consists of highly combustible/flammable liquids and gases such as petroleum oil and propane.
4 0
3 years ago
Will Mark the brainliest
Sonbull [250]

Answer:

computer

Explanation:

By typing and answer and keep the data and have files

4 0
3 years ago
Write a program to help a local restaurant automate its breakfast billing system. The program should do the following:
Maurinko [17]

Answer:

Please find the code and its output in the attached file:

Explanation:

In this code a structure "menuItemType" is defined that declared float and integer variable and outside the structure its list type variable "menuList" is defined that holds and calculates its value.

In the next step, a class "Rest" is defined, and inside the class a method "getData", "showMenu", and "printCheck" is defined, in which the above methods uses the switch for input and calculate the value and the last "printCheck" calculates the Tax and Amount Due value.

In the main method, a class object is created that prints message and call the above method.

6 0
3 years ago
Other questions:
  • How far from the bullet is text indented
    6·2 answers
  • What command do you type in the search box to access the command line intrface in windows?
    8·1 answer
  • UDP and TCP use 1s complement for their checksums. Suppose you have the following three 8-bit bytes: 01010011, 01100110, 0111010
    13·1 answer
  • What Is one reason that more personal computers have windows operating systems as opposed to Mac operating systems
    7·2 answers
  • Why is the technology so effective in tracking contacts
    7·1 answer
  • What section in an ethernet frame will you find a Virtual Local Area Network (VLAN) header?
    6·1 answer
  • Create a new Java class called AverageWeight. Create two arrays: an array to hold 3 different names and an array to hold their w
    13·1 answer
  • Can rank u r guys in rocket leagye
    13·1 answer
  • How does social media help?<br><br>i will give you the brainliest​
    13·2 answers
  • How many pages is 1500 words double spaced 12pt font?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!