Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


C# - Call method from another class with shortened name.

Posted on 2014-11-10
Medium Priority
Last Modified: 2014-11-11

Inside the class amazon.cs, have this:
public class keisoku
            public static double f2_nUD_D[6];

Open in new window

How to call this amazon.keisoku.f2_nUD_D[x] in another class with amazon.keisoku shortened to  amk?

Open in new window

Question by:ocaccy
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 83

Accepted Solution

David Johnson, CD, MVP earned 668 total points
ID: 40434327
make a class in the current namepace that amk which calls amazon.keisoku
LVL 14

Assisted Solution

by:Vel Eous
Vel Eous earned 668 total points
ID: 40434762
You can use a 'using' directive alias:

namespace ConsoleApplication1
    using amk = AmazonCs.SubNamespace.AnotherSubNamespace.keisoku;

    internal class Program
        private static void Main()
            var buffer = amk.buffer;

namespace AmazonCs.SubNamespace.AnotherSubNamespace
    public unsafe struct f2_NUD_D
        public fixed double buffer [6];

    public class keisoku
        public static f2_NUD_D buffer;

Open in new window


Assisted Solution

toakkiyadav earned 664 total points
ID: 40435360
Agree with Tchuki.

alias should work here.

For your problem:
using amk = namespace.Amazon.keisoku;



Author Closing Comment

ID: 40436473
Amazing !

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question