Xamarin Forms: Build Native Cross-platform Apps with C# . 35–38

tony Guo
tony Guo
Jul 30, 2017 · 3 min read

static靜態類別和靜態類別成員:

之前在學C#時有許多不了解,不過沒關西,剛好在這堂課中又用到了,那就趁機把它學起來吧!

依照微軟“C# 程式設計手冊”

所述static跟所有非靜態類別相同,只有一項差異,就是無法具現化靜態類別

也就是說我們無法用new來對static靜態類別做具現化,舉例來說

我們可以對這個Math的class用new具現化,但是如果加上static

馬上就出現紅色波浪,竟然說不能具現化,要怎麼使用呢>>直接調用囉!

結果

終於可以進入課程了~~

這個章節主要是教大家在APP中放入圖片

首先

  1. 先建立一個空的content Page Xaml,並命名為MyPage_image

2.接著在MyPage_image.xaml中,先輸入以下CODE

3.然後再到MyPage_image.xaml.cs中輸入

3.看結果~~等等會有詳細解說~~

    tony Guo

    Written by

    tony Guo

    追知識追夢追科技,喜歡新穎的事物及看法,更喜歡思考。Master student at NCTU

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade