Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace OutErrors
- {
- class Program
- {
- static void Main(string[] args)
- {
- string statement = "GARRRR";
- bool marker;
- string murmur = Whisper(statement,out marker); //when call method should also use out keyword
- Console.WriteLine(murmur);
- }
- static string Whisper(string phrase, out bool wasWhisperCalled)
- {
- wasWhisperCalled = true; //out parameter must be assigned a value before the return statement
- return phrase.ToLower();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement