Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ C # assembly calls across constants, variables and functions     - Samba file sharing server set up (Server)

- Java loop list to solve the problem of Joseph ring (Programming)

- 12 Linux Process Management Commands (Linux)

- Ubuntu server 8.04 Firewall Guide (Linux)

- Single Instance ASM under CRS-4124, CRS-4000 error handling (Database)

- Oracle 11g new features and associated SQL TUNING (Database)

- GAMIT 10.50 installed in Ubuntu 12.04 system (Linux)

- Using packet capture libpcap be reconciliation package in Ubuntu 14.04 64 bits (Linux)

- Recover Ubuntu 14.04 wakes up from standby in case mouse keyboard appears dead (Linux)

- 3 tips Linux command (Linux)

- Mutt - an email client that sends messages through the terminal (Linux)

- Linux System Getting Started Learning: Join cron job in Linux (Linux)

- Use value type build better applications Swift (Programming)

- MacBook Air install Ubuntu dual system (Linux)

- Java gets the current system time System.currentTimeMillis () (Programming)

- Gitolite how to import other Git repositories (Server)

- Zabbix monitoring of the switch (Server)

- Install RAID 6 (Striping double distributed parity) (Linux)

- Nginx + Tomcat static and dynamic load balancing and separation configuration essentials under Linux (Server)

- Oracle data row split multiple lines (Database)

 
         
  C # assembly calls across constants, variables and functions
     
  Add Date : 2017-05-10      
         
         
         
  Today try to explain the concept of C # assemblies when suddenly asked to live. It is also a function seriously under C # assemblies, this article is about C # assembly calls across other assemblies constants, variables, and functions.

Step 1: Create two assemblies, namely "Windows Forms Application" and "library" C # under, were named "AAAAA" and "BBBBB". Assembly "BBBBB" The class was renamed MyClass

Step 2: Modify the assembly "BBBBB", file MyClass.cs code as follows:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace BBBBB
{
    public class MyClass
    {
        /// < Summary>
        Constants ///
        /// < / Summary>
        public const string DateInfo1 = "2015/1/5";
        
        /// < Summary>
        /// Static variables
        /// < / Summary>
        public static string DateInfo2 = "2015/1/5";
 
        /// < Summary>
        /// Method ( "print Hello World!")
        /// < / Summary>
        public static void SayHi ()
        {
            Console.WriteLine ( "Hello World!");
        }
    }
}

There is a constant DateInfo1, a static variable DateInfo2, print a string to the console "Hello World!" Approach

Step 3: Add the assembly reference "BBBBB" in the assembly "AAAAA" reference manager. Assembly "AAAAA" reference manager in Solution Explorer, right-click Assembly "AAAAA" below "Reference", click "Add Reference" button to enter. Enter the assembly "AAAAA" reference manager after the tree menu on the left, find the "Solution" -> "Project", check the inside of the "BBBBB", and press the "OK" button to save the settings.

Step 4: Download this assembly "AAAAA" in the following code can be set using the program "BBBBB" a namespace

Program.cs file in the code as follows:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
using BBBBB;
 
namespace AAAAA
{
    class Program
    {
        static void Main (string [] args)
        {
            // Print constants
            Console.WriteLine (BBBBB.MyClass.DateInfo1);
 
            // Print the static variable
            Console.WriteLine (BBBBB.MyClass.DateInfo2);
            
            // Call the method
            BBBBB.MyClass.SayHi ();
 
            Console.ReadLine ();
        }
    }
}

Step 5: Build Solution, run the program, the results

Other: two documents constitute Debug directory

1) Assembly "AAAAA" in the Debug directory :( include all the information assembly "BBBBB" compiled out)

2) Debug directory assembly "BBBBB" under

END
     
         
         
         
  More:      
 
- Linux dd command make U disk boot disk (Linux)
- Whisker Menu 1.4.3 Install menu Linux (Linux)
- Shell script on the variables with double quotation marks grep small problem (Programming)
- for (int a: i) the use of the Java programming (Programming)
- Nginx multi-domain certificate HTTPS (Server)
- Kernel compile under Debian (Linux)
- Three easy open source firewall on the Linux platform (Linux)
- Java Graphics2D Paint (Programming)
- Bug tracking library after FastJson omitted the decimal point 0 (Programming)
- Java memory analysis tool uses detailed MAT (Programming)
- Under Ubuntu 15.04 installation JDK8 (Linux)
- Linux / proc directory Comments (Linux)
- LVM Disk Manager Application (Linux)
- GRUB2 boot Ubuntu Manual (Linux)
- Sorting algorithm of dichotomy (binary) insertion sort algorithm (Programming)
- Ubuntu 14.04 Boot Repair (Linux)
- Linux --- process tracking (Linux)
- Debian 7 and Debian 8 users how to install Oracle Java 8 (Linux)
- Mutt - an email client that sends messages through the terminal (Linux)
- Debian Stable (Jessie 8.1) of normal.mod not found (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.