Activity Stream
48,167 MEMBERS
6961 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24
  1.     
    #21
    Respected Developer
    Don't confuse using with includes. Using in C# is nothing but a shortcut and has no impact on performance.

    Example:
    PHP Code: 
    System.Console.WriteLine("You know...");
    System.Console.WriteLine("Writing system all the time gets anoying real quick.");
    System.Console.WriteLine("That's why 'using' is the best thing since sliced bread!"); 
    Why should we write the System namespace all the time to access the Console class? We don't. So we add:
    PHP Code: 
    using System
    So we can just:
    PHP Code: 
    Console.WriteLine("You know...");
    Console.WriteLine("Writing system all the time gets anoying real quick.");
    Console.WriteLine("That's why 'using' is the best thing since sliced bread!"); 
    We can also create an alias:
    PHP Code: 
    using System;
    using c System.Console
    To do:
    PHP Code: 
    c.WriteLine("You know...");
    c.WriteLine("Writing system all the time gets anoying real quick.");
    c.WriteLine("That's why 'using' is the best thing since sliced bread!"); 
    The closest you'll get to include()/require() in a language like C# is adding references to other assemblies in Visual Studio (well you can load them at runtime or even compile and run source code at runtime but that's on a whole other level, lol).

  2.     
    #22
    Member
    Website's:
    Rapidleech.com FullMaza.com WarezOcean.com MediaFireForum.com
    I couldn't understand even a bit of this thread....

    I guess, i shouldn't dig my hands into C# yet.

  3.   Sponsored Links

  4.     
    #23
    Respected Developer
    Well if you never start learning your never gonna understand it .


  5.     
    #24
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea i understand what you was sating about the "using" keyword. and i know about name-spaces etc and not to be confused with includes etc. just was not sure about the compilation of files, weather theres an include system with C and name-spaces, i understand now that they all below to the one assembly so using would make methods available in that file without using its parents !
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SSH Command Variables
    By Maverick in forum Server Management
    Replies: 1
    Last Post: 11th Jan 2012, 05:40 AM
  2. C++ Variables & IO [Lesson 2]
    By NucleA in forum Web Development Area
    Replies: 1
    Last Post: 11th Dec 2010, 08:30 PM
  3. How to streamline objects in PHP!
    By litewarez in forum Tutorials and Guides
    Replies: 8
    Last Post: 29th May 2010, 05:26 PM
  4. Swap photo/avatar variables
    By Golden Falcon in forum IP.Board
    Replies: 7
    Last Post: 12th Feb 2010, 06:18 PM
  5. Optimizing the mysqld variables
    By Lease in forum Technical and Security Tutorials
    Replies: 0
    Last Post: 14th Jan 2008, 05:30 AM

Tags for this Thread

BE SOCIAL