|
Hello,
So I have the following layout in my project:
Solution ('sol')
namespace A
------folder 1A
------------folder 1A1
------------------file Af.cs
namespace B
------folder 1B
------------file Bf.cs
Now, in file Bf.cs I want to call a method which is in file Af.cs. How can I do that? I can't create an object of type Af, because I cannot call the namespace A for some reason. I am getting a message namespace A cannot be found whenever I use: using A.1A.1A1;
The dashes above are there just to show the hierarchy ( indentation ).
Thank you!
|
|
|
|
|
If "namespace A" and "namespace B" represent projects, then you have to add reference to project A in project B (right-click project B icon -> "Add reference" -> tab "Projects" select project A and click OK).
|
|
|
|
|
martingeorgiev wrote: Solution ('sol')namespace A------folder 1A
You can have multiple (or nested) folders with the same namespace - so make sure you actually have those namespaces available on those folders.
|
|
|
|
|
I don't see where folders come into the picture.
Maybe you have a Java background, where there was a strong link between namespace structure and file structure; there is no such thing in .NET
Files reside in folders.
Types reside in namespaces.
You can have (parts of) more than one namespace in a file.
You can have a namespace spread over many files and folders.
The project holds files, and the compiler will locate and deal with all types in them.
And to locate types in some other project, you'd have to add a reference.
|
|
|
|
|
Luc Pattyn wrote: there is no such thing in .NET real programming.
|
|
|
|
|
Thanks everybody for your assistance!
|
|
|
|
|
you're welcome.
|
|
|
|
|
Where can I get information on nested masterpages ?
Has anyone tried implementing them and what are it's pros cons?
|
|
|
|
|
An ASP question, eh?
I've used them before, when I want to have a menu in the master, and a sub-menu that only appears on certain pages in the "secondary" master.
Just make the primary the master of the secondary, as shown below:
<%@ Master Language="C#" MasterPageFile="~/Master01.Master" AutoEventWireup="true" CodeBehind="Master02.master.cs" Inherits="Namespace.Master02" %>
Then on the page, use the secondary as master (which will also include its master, the primary):
<%@ Page Language="C#" MasterPageFile="~/Master02.master" AutoEventWireup="true"
(etc...)
|
|
|
|
|
thanks timothy,
well pointed i'll shift to the asp.net MB
|
|
|
|
|
Oh, I wouldn't do that - cross-posting is frowned upon here.
|
|
|
|
|
uh oh..!!! done it already
apologies to admin
|
|
|
|
|
I want to make an application in C# that will control(suppose generate click event on a button without clicking on flash file button) flash file and also get action event from flash file when a button is clicked or something is typed on flash file.
Is it possible?
Please help me.
|
|
|
|
|
Last I checked, Flash doesn't expose any events about anything that's going on while the Flash script is running. That means your code will never know anyone typed in a field in Flash. Nor does it expose a button like Windows does. You can only "click" on a Flash window by sending a crafted MouseDown message, supplying mouse coordinates for the click, to the Flash window.
|
|
|
|
|
I want to write a string "A";
the left of string A is blue and the right of the string A is green.
How to make it?
public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle);
modified on Wednesday, July 7, 2010 11:25 AM
|
|
|
|
|
Any particular colour you would like the horizontal bar?
|
|
|
|
|
Use a LinearGradientBrush as the brush.
|
|
|
|
|
Ok. I have made it.
thanks.
|
|
|
|
|
Hi
I want a DLL that compare 2 text and give me the diffrents (highlight them).
TY.
|
|
|
|
|
Me wants a software that makes me rich or happy (or both)!!!!!!
Read the guidelines at the top of this page and rephrase your "question"!
Greetings
Covean
|
|
|
|
|
There are several articles on CP about how to do it, with source code.
|
|
|
|
|
|
|
I want to ask how can I read the data from the smartcard using C#? I want to read the government national ID card details but and the government provide this details only:
<a href="http://www.smartcard.gov.bh/pdf/readerspecs.pdf">Smartcard Specefication</a>[<a href="http://www.smartcard.gov.bh/pdf/readerspecs.pdf" target="_blank" title="New Window">^</a>]
|
|
|
|
|
By the looks of this the readers will implement a couple of protocols. There are a number of SDKs on the web for Mifare (some free, some paid).
If you know who the manufacturer is, you can likely request the SDK directly from them.
Without that, you'd minimally need to work backwards from the driver if you have it. You'll also need guidance on what is stored on the card and how to pull it off, in the absence of an SDK. If you don't have those thing, uh...you won't be reading from the card in any reasonable amount of time.
Cheers.
|
|
|
|