code_junkie

using a public static class in a 'Project' with defined namespaces

Nov 13th, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. namespace Personnel_Database
  2. {
  3. public partial class _default : System.Web.UI.Page
  4. {
  5. protected void Page_Load(object sender, EventArgs e)
  6. {
  7. utils.someFunction();//this does not work
  8.  
  9. namespace Personnel_Database.App_Code
  10. {
  11. public static class utils
  12. {
  13.  
  14. using Personnel_Database.App_Code;
  15. // now you can use everything that is inside the Personnel_Database.App_Code namespace
  16. namespace Personnel_Database
  17. {
  18. ...
  19.  
  20. protected void Page_Load(object sender, EventArgs e)
  21. {
  22. Personnel_Database.App_Code.utils.someFunction();
  23. ...
  24.  
  25. using Personnel_Database.App_Code;
  26.  
  27. <%@ Import Namespace="Personnel_Database.App_Code" %>
  28.  
  29. using Personnel_Database.App_Code;
  30.  
  31. namespace Personnel_Database
  32. {
  33. public static class utils
  34. {
Add Comment
Please, Sign In to add comment