Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to use Console.WriteLine() in App.cs/[something].xaml.cs

$
0
0

I'm a beginner and I wanna use Console.WriteLine() in shared code, but it would lead to an error.

// In ButtonXaml Sample
public void OnButtonClicked(object sender, EventArgs args)
        {
            count++;
            Console.WriteLine("test");
            ((Button)sender).Text = 
                String.Format("{0} click{1}!", count, count == 1 ? "" : "s");
        }

I have tried to copy these references form ButtonXaml.Android:
- System
- System.Core


Viewing all articles
Browse latest Browse all 58056

Trending Articles