Results 1 to 2 of 2

Thread: scope

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    83

    scope

    what are the scopes of block level, function level and global level of a page.
    I presume block is a part of a pg and function is a function but what's global? the entire page? and if so whats the differene between global and page scope?
    thanks

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Re: scope

    Scope progresses from:
    1. Block
    2. Function
    3. Page (Class)
    4. Global


    A page in ASP.Net is a class. So really, you should learn to substitute Class for Page terminology wise. Global scope is available throughout an entire assembly, so two classes can reference the variable. Normally, you'd use a public static readonly field on a variable you want accessed globablly.
    Last edited by nemaroller; Apr 27th, 2005 at 09:57 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width