The type or namespace name 'Assembly' could not be found

ChunYuChunYu CAMember, University

I took the form class last Friday. The instructor showed us some cool scripts. I am trying to following his scripts, but I got the error :
"The type or namespace name 'Assembly' could not be found"

Assembly core = typeof(Label).GetTypeInfo().Assembly;
TypeInfo viewType = typeof(View).GetTypeInfo();

        foreach (var controlType in core.DefinedTypes.Where(viewType.IsAssignableFrom))
        {
            var label = new Label
            {
                Text = controlType.Name,
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };

            layout.Children.Add(label);
        }

VS 2013 can't find Assembly, GetTypeInfo. In the Android Components, I have included Xamarin Mobile (0.74), and Android Support Library v13(20.0.0.4)

In the app.cs, I have the following references.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;

Why it worked in the class, but no my laptop?

thanks

Chun

Sign In or Register to comment.