Use of strings 4 - var2

  • pptx
  • 02.05.2020
Публикация на сайте для учителей

Публикация педагогических разработок

Бесплатное участие. Свидетельство автора сразу.
Мгновенные 10 документов в портфолио.

Иконка файла материала Use of strings 4 - var2.pptx

After executing the code given below, how can you preserve computer memory?
1. for(int i=0; i<1000;i++)
2. {
3. s=s.Concat(s,i.ToString());
4. }

Revision

StringBuilder= new StringBuilder(); 
 
for(int i=0; i<1000;i++)  
{  
    s.Append(i);  
}   

Answer

What namespace StringBuilder belong to?

System.Text

Namespace:

Use of strings

LO: Use of procedures and functions for processing the strings

Evaluation Criteria:

Knowledge
• Know how to find Length of string

Understanding
• How to output the string array elements

Application
• Write code for processing the strings using functions
• Write code for processing the strings using procedures

Useful expressions for dialogs and letters:

Well, to work with array of strings … .

For example, each element of string array … .

As a matter of fact, the stings are used in the wide variety of cases to … .

Task

practice with string array using loop operator for

Evaluation Criteria

Descriptors

How to output the 2D string array elements

Creates 2D array that contains 3 fruits’ names and their prices in main program
Main program passes an array to procedure
Procedure outputs the array elements
Uses for loop operator to output array elements

https://www.youtube.com/watch?v=hDADKBwUi0Q

Watch the video about 2D string array manipulation
via this link in YouTube :

Summary
Questions:
How the loop operator For functions for 2D string arrays?
What is the difference of procedure and function?