SlideShare a Scribd company logo
1 of 1
Download to read offline
1. What is a method in C# ? 2. What are they used for? 3. Describe at least 2 benefits of using
them 4. What are access modifiers? List and describe each of them 5. Why do we use access
modifiers in methods? 6. What are the parameters in a method? Are they required? Why or why
not? 7. What is the difference between out and ref? When/why would use either of them? 8. What
is the difference between pass by reference and pass by value? Give examples and describe both
9. What is static used for when creating a method? 10. Explain each part of this method: public
static void getNumbers(int a, int b)

More Related Content

More from abhishek483040

1 Write a program that creates an Integer class Date which .pdf
1 Write a program that creates an Integer class Date which .pdf1 Write a program that creates an Integer class Date which .pdf
1 Write a program that creates an Integer class Date which .pdfabhishek483040
 
1 Write a function named time that has an integer parame.pdf
1 Write a function named time  that has an integer parame.pdf1 Write a function named time  that has an integer parame.pdf
1 Write a function named time that has an integer parame.pdfabhishek483040
 
1 Write a paper on the topic The impact of the implementat.pdf
1 Write a paper on the topic The impact of the implementat.pdf1 Write a paper on the topic The impact of the implementat.pdf
1 Write a paper on the topic The impact of the implementat.pdfabhishek483040
 
1 Write a function to add the integers from a to b a and b.pdf
1 Write a function to add the integers from a to b a and b.pdf1 Write a function to add the integers from a to b a and b.pdf
1 Write a function to add the integers from a to b a and b.pdfabhishek483040
 
1 Write a detailed comprehensive brand strategy report for .pdf
1 Write a detailed comprehensive brand strategy report for .pdf1 Write a detailed comprehensive brand strategy report for .pdf
1 Write a detailed comprehensive brand strategy report for .pdfabhishek483040
 
1 Within this assignment you must detail specific material .pdf
1 Within this assignment you must detail specific material .pdf1 Within this assignment you must detail specific material .pdf
1 Within this assignment you must detail specific material .pdfabhishek483040
 
1 Why would you want to make your work reproducible 2 W.pdf
1 Why would you want to make your work reproducible 2 W.pdf1 Why would you want to make your work reproducible 2 W.pdf
1 Why would you want to make your work reproducible 2 W.pdfabhishek483040
 
1 Which of the following statements is not TRUE regarding S.pdf
1 Which of the following statements is not TRUE regarding S.pdf1 Which of the following statements is not TRUE regarding S.pdf
1 Which of the following statements is not TRUE regarding S.pdfabhishek483040
 
1 Winterville a city of population 125000 in the Rust Bel.pdf
1 Winterville a city of population 125000 in the Rust Bel.pdf1 Winterville a city of population 125000 in the Rust Bel.pdf
1 Winterville a city of population 125000 in the Rust Bel.pdfabhishek483040
 
1 Why is transportation considered so important to the US.pdf
1 Why is transportation considered so important to the US.pdf1 Why is transportation considered so important to the US.pdf
1 Why is transportation considered so important to the US.pdfabhishek483040
 
1 Why do cells need their DNA to be condensed before dividi.pdf
1 Why do cells need their DNA to be condensed before dividi.pdf1 Why do cells need their DNA to be condensed before dividi.pdf
1 Why do cells need their DNA to be condensed before dividi.pdfabhishek483040
 
1 Which wariable is the dependent wariable Choose a Amou.pdf
1 Which wariable is the dependent wariable Choose a Amou.pdf1 Which wariable is the dependent wariable Choose a Amou.pdf
1 Which wariable is the dependent wariable Choose a Amou.pdfabhishek483040
 
1 Why do you think that there are two different types of DN.pdf
1 Why do you think that there are two different types of DN.pdf1 Why do you think that there are two different types of DN.pdf
1 Why do you think that there are two different types of DN.pdfabhishek483040
 
1 Which typical team challenges refer to those in the book.pdf
1 Which typical team challenges refer to those in the book.pdf1 Which typical team challenges refer to those in the book.pdf
1 Which typical team challenges refer to those in the book.pdfabhishek483040
 
1 Which is a major assumption of the BD model of population.pdf
1 Which is a major assumption of the BD model of population.pdf1 Which is a major assumption of the BD model of population.pdf
1 Which is a major assumption of the BD model of population.pdfabhishek483040
 
1 Which property of the form determines what fields are popu.pdf
1 Which property of the form determines what fields are popu.pdf1 Which property of the form determines what fields are popu.pdf
1 Which property of the form determines what fields are popu.pdfabhishek483040
 
1 Which of the following statements best describes why deat.pdf
1 Which of the following statements best describes why deat.pdf1 Which of the following statements best describes why deat.pdf
1 Which of the following statements best describes why deat.pdfabhishek483040
 
1 Which of the following isare the best complete statement.pdf
1 Which of the following isare the best complete statement.pdf1 Which of the following isare the best complete statement.pdf
1 Which of the following isare the best complete statement.pdfabhishek483040
 
1 Which of the following statements about prokaryote relati.pdf
1 Which of the following statements about prokaryote relati.pdf1 Which of the following statements about prokaryote relati.pdf
1 Which of the following statements about prokaryote relati.pdfabhishek483040
 
1 Which of the following statements about a proforma balan.pdf
1 Which of the following statements about a proforma balan.pdf1 Which of the following statements about a proforma balan.pdf
1 Which of the following statements about a proforma balan.pdfabhishek483040
 

More from abhishek483040 (20)

1 Write a program that creates an Integer class Date which .pdf
1 Write a program that creates an Integer class Date which .pdf1 Write a program that creates an Integer class Date which .pdf
1 Write a program that creates an Integer class Date which .pdf
 
1 Write a function named time that has an integer parame.pdf
1 Write a function named time  that has an integer parame.pdf1 Write a function named time  that has an integer parame.pdf
1 Write a function named time that has an integer parame.pdf
 
1 Write a paper on the topic The impact of the implementat.pdf
1 Write a paper on the topic The impact of the implementat.pdf1 Write a paper on the topic The impact of the implementat.pdf
1 Write a paper on the topic The impact of the implementat.pdf
 
1 Write a function to add the integers from a to b a and b.pdf
1 Write a function to add the integers from a to b a and b.pdf1 Write a function to add the integers from a to b a and b.pdf
1 Write a function to add the integers from a to b a and b.pdf
 
1 Write a detailed comprehensive brand strategy report for .pdf
1 Write a detailed comprehensive brand strategy report for .pdf1 Write a detailed comprehensive brand strategy report for .pdf
1 Write a detailed comprehensive brand strategy report for .pdf
 
1 Within this assignment you must detail specific material .pdf
1 Within this assignment you must detail specific material .pdf1 Within this assignment you must detail specific material .pdf
1 Within this assignment you must detail specific material .pdf
 
1 Why would you want to make your work reproducible 2 W.pdf
1 Why would you want to make your work reproducible 2 W.pdf1 Why would you want to make your work reproducible 2 W.pdf
1 Why would you want to make your work reproducible 2 W.pdf
 
1 Which of the following statements is not TRUE regarding S.pdf
1 Which of the following statements is not TRUE regarding S.pdf1 Which of the following statements is not TRUE regarding S.pdf
1 Which of the following statements is not TRUE regarding S.pdf
 
1 Winterville a city of population 125000 in the Rust Bel.pdf
1 Winterville a city of population 125000 in the Rust Bel.pdf1 Winterville a city of population 125000 in the Rust Bel.pdf
1 Winterville a city of population 125000 in the Rust Bel.pdf
 
1 Why is transportation considered so important to the US.pdf
1 Why is transportation considered so important to the US.pdf1 Why is transportation considered so important to the US.pdf
1 Why is transportation considered so important to the US.pdf
 
1 Why do cells need their DNA to be condensed before dividi.pdf
1 Why do cells need their DNA to be condensed before dividi.pdf1 Why do cells need their DNA to be condensed before dividi.pdf
1 Why do cells need their DNA to be condensed before dividi.pdf
 
1 Which wariable is the dependent wariable Choose a Amou.pdf
1 Which wariable is the dependent wariable Choose a Amou.pdf1 Which wariable is the dependent wariable Choose a Amou.pdf
1 Which wariable is the dependent wariable Choose a Amou.pdf
 
1 Why do you think that there are two different types of DN.pdf
1 Why do you think that there are two different types of DN.pdf1 Why do you think that there are two different types of DN.pdf
1 Why do you think that there are two different types of DN.pdf
 
1 Which typical team challenges refer to those in the book.pdf
1 Which typical team challenges refer to those in the book.pdf1 Which typical team challenges refer to those in the book.pdf
1 Which typical team challenges refer to those in the book.pdf
 
1 Which is a major assumption of the BD model of population.pdf
1 Which is a major assumption of the BD model of population.pdf1 Which is a major assumption of the BD model of population.pdf
1 Which is a major assumption of the BD model of population.pdf
 
1 Which property of the form determines what fields are popu.pdf
1 Which property of the form determines what fields are popu.pdf1 Which property of the form determines what fields are popu.pdf
1 Which property of the form determines what fields are popu.pdf
 
1 Which of the following statements best describes why deat.pdf
1 Which of the following statements best describes why deat.pdf1 Which of the following statements best describes why deat.pdf
1 Which of the following statements best describes why deat.pdf
 
1 Which of the following isare the best complete statement.pdf
1 Which of the following isare the best complete statement.pdf1 Which of the following isare the best complete statement.pdf
1 Which of the following isare the best complete statement.pdf
 
1 Which of the following statements about prokaryote relati.pdf
1 Which of the following statements about prokaryote relati.pdf1 Which of the following statements about prokaryote relati.pdf
1 Which of the following statements about prokaryote relati.pdf
 
1 Which of the following statements about a proforma balan.pdf
1 Which of the following statements about a proforma balan.pdf1 Which of the following statements about a proforma balan.pdf
1 Which of the following statements about a proforma balan.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 

1 What is a method in C 2 What are they used for 3 De.pdf

  • 1. 1. What is a method in C# ? 2. What are they used for? 3. Describe at least 2 benefits of using them 4. What are access modifiers? List and describe each of them 5. Why do we use access modifiers in methods? 6. What are the parameters in a method? Are they required? Why or why not? 7. What is the difference between out and ref? When/why would use either of them? 8. What is the difference between pass by reference and pass by value? Give examples and describe both 9. What is static used for when creating a method? 10. Explain each part of this method: public static void getNumbers(int a, int b)