.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 2nd, 2008, 04:09 PM
Zirus Zirus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Location: U.K.
Posts: 8 Zirus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 6 sec
Reputation Power: 0
How do I compile an Instantiable class + the startup class that calls it in Visual st

Hi :-)

I`m stuck, the book im learning from teaches everything from use via the command promt not visual studio, the chapter ive just started is about instantiable classes so in visual studio I am unable to compile either the instantiable class nor the startup class.
With the startup its "Error type or namespace XXX could not be found (are you missing... " ect
and in the instantiable class the error is thaqt it doesnt contain an entry point (Main() lol) which would be fine if it still compiled but no .exe is created.....

Ive looked through Help with no luck and search in help crashs me (even a reinstall doesnt fix that :-/)

I have attempted a right-click add referance on the right but the file types its looking for are file types that do not exist in my instantiable classes solutuion folder :-/ (cept for debug) can anyone help out?

Basicaly, I have written a lil method I wanna just call (instantiate into an object if I have to, but would much rather just have a "using" that class at the top and just call the method when I want it, just as calling WriteLine("blah") )when I want to use it, which is often.

Can anyone help?

Cheers

Reply With Quote
  #2  
Old May 3rd, 2008, 08:54 AM
eclipsed4utoo eclipsed4utoo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 143 eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 21 h 50 m 59 sec
Reputation Power: 26
could you post your code? and please use the CODE TAGS.

Reply With Quote
  #3  
Old May 3rd, 2008, 01:30 PM
Zirus Zirus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Location: U.K.
Posts: 8 Zirus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by eclipsed4utoo
could you post your code? and please use the CODE TAGS.


Sure no problem

Here is the instantiable class.
This file is named "Banner" too of course
Code:
using System;

public class Banner
{
    public string codingLanguage;
    public void Display()
    {
        Console.WriteLine("I'm using " + codingLanguage);
    }
}


and here's the startup class
Code:
public class Example7_1
{
    public static void Main(string[] args)
    {
        Banner x = new Banner();
        x.codingLanguage = "C#";
        x.Display();
    }
}

Reply With Quote
  #4  
Old May 3rd, 2008, 04:52 PM
eclipsed4utoo eclipsed4utoo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 143 eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level)eclipsed4utoo User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 21 h 50 m 59 sec
Reputation Power: 26
what line of code are you getting the error message at? and what namespace is it saying that you are missing?

Reply With Quote
  #5  
Old May 5th, 2008, 12:14 PM
Zirus Zirus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Location: U.K.
Posts: 8 Zirus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 6 sec
Reputation Power: 0
It's cool, the problem is now fixed with a responce on another board

"Pulldown menu "Project" add class" hehe :-)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > How do I compile an Instantiable class + the startup class that calls it in Visual st


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT