locked
Is there anyway that a method of customized class can accept a variable of the type StorageFile? RRS feed

  • Question

  • Thank you for your answer! Please help!

    Thursday, January 8, 2015 10:04 AM

Answers

  • i mean in the class i created, not in the Mainpage.xaml.cs.

    like i create a class of book

    public class Book
    {
        public string Title{get;set;}
        public void Load(StorageFile file)
        {
            Title=file.name;
        }
    }

    • Marked as answer by Brian RM 7 Sunday, March 15, 2015 12:39 AM
    Friday, January 9, 2015 8:12 AM

All replies

  • this? public void MyMethod(StorageFile file)

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, January 8, 2015 10:09 AM
  • i mean in the class i created, not in the Mainpage.xaml.cs.

    like i create a class of book

    public class Book
    {
        public string Title{get;set;}
        public void Load(StorageFile file)
        {
            Title=file.name;
        }
    }

    • Marked as answer by Brian RM 7 Sunday, March 15, 2015 12:39 AM
    Friday, January 9, 2015 8:12 AM
  • So you do that whats wrong with it?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Friday, January 9, 2015 8:31 AM
  • Hi,

    Do you can successfully resolve your problem? Please clarify your issue in detail!

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Monday, January 26, 2015 5:31 AM