Reputation: 358
I'm 12 hours into using Xamarin, and have a beginner blocker while working on a Xamarin / c# project for iOS 7.
This is how I though the view controller should call kickOff (but it doesnt work):
using iOS;
...
public void ViewDidLoad () {
base.ViewDidLoad ();
kickOff ();
}
exampleClass.cs:
namespace iOS
{
public class foo
{
public static void kickOff (){
Console.WriteLine("Success!");
}
}
What am I missing? Thanks!
Upvotes: 0
Views: 2311
Reputation: 1976
You never point to the class foo. You need to tell it where to look for the method kickOff()
The following should work:
foo.kickOff();
Note
Your question doesn't say what doens't work, but I'm assuming it's a compiler error about kickOff not being a valid method
Upvotes: 6