locked
what is the meaning of this?

    Question

  • Unless you specifically want to expose a List<T> via a public interface.
    what is the meaning of Expose.?
    I am not very good in english in programming content.
    please help
    Brainstorm your Brain and find solution,if no result stuck to Brainstormer.
    Friday, July 10, 2009 7:30 PM

Answers

  • It means to make it possible for someone to access the property or field from outside the class. 

    public class MyClass
    {
         private List<string> AList = new List<string>(); // <---- not "exposed", as it's private.
         protected List<string> ProtectedList = new List<string>(); // <---- not "exposed" as it's protected.
         public List<string> PublicList = new List<string>(); // <---- exposed, because it's public and can be accessed outside of MyClass.
    }
    David Morton - http://blog.davemorton.net/ - @davidmmorton - ForumsBrowser, a WPF MSDN Forums Client
    • Marked as answer by simosi Friday, July 10, 2009 7:42 PM
    Friday, July 10, 2009 7:32 PM
    Moderator
  • That term threw me a bit when I first heard it and I was born speaking English.

    Expose:  In this case, it means to open up something to the public.  To allow it to be viewed publicly.
    Mark the best replies as answers. "Fooling computers since 1971."
    • Marked as answer by simosi Friday, July 10, 2009 7:42 PM
    Friday, July 10, 2009 7:35 PM
    Moderator

All replies

  • It means to make it possible for someone to access the property or field from outside the class. 

    public class MyClass
    {
         private List<string> AList = new List<string>(); // <---- not "exposed", as it's private.
         protected List<string> ProtectedList = new List<string>(); // <---- not "exposed" as it's protected.
         public List<string> PublicList = new List<string>(); // <---- exposed, because it's public and can be accessed outside of MyClass.
    }
    David Morton - http://blog.davemorton.net/ - @davidmmorton - ForumsBrowser, a WPF MSDN Forums Client
    • Marked as answer by simosi Friday, July 10, 2009 7:42 PM
    Friday, July 10, 2009 7:32 PM
    Moderator
  • You did not provide much context here ...

    But "expose" here probably means to "provide as public so other code can easily access it".

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    Friday, July 10, 2009 7:33 PM
  • To add to David's post, you also say that some type/instantiation is exposed when it's used as a return type or an argument in a public method.
    http://blog.voidnish.com
    Friday, July 10, 2009 7:34 PM
    Moderator
  • That term threw me a bit when I first heard it and I was born speaking English.

    Expose:  In this case, it means to open up something to the public.  To allow it to be viewed publicly.
    Mark the best replies as answers. "Fooling computers since 1971."
    • Marked as answer by simosi Friday, July 10, 2009 7:42 PM
    Friday, July 10, 2009 7:35 PM
    Moderator
  • Thanks everyone for your instant help.

    Brainstorm your Brain and find solution,if no result stuck to Brainstormer.
    Friday, July 10, 2009 7:43 PM