473,657 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compiling..

hi,

I'm following example 'Intro7.aspx' here,
http://www.csharpfriends.com/quickst...px#customctrls

it says on top of Acme.cs "namespace Acme" I assume this means Acme.cs
has to be in a dir called 'Acme'? (am assuming namespace is equiv to
Java's packages; is this right?)

at any rate I can't compile Acme.cs.. get errors (I'm compiling in
command line, thus: csc.exe Acme.cs.. get lots of errors, dealing mostly
with obsolete stuff..)

I'm also confused about two other things:

1) I don't see this, CodeFile="Acme. cs" anywhere in aspx.. (going by
what I see where I work, just started working here & trying to learn
..NET..)

2) Acme.cs starts with

public class Calendar : Control, IPostBackEventH andler,
IPostBackDataHa ndler

but Control is a class, not an interface (can u implement classes?)

thank you.

Jul 17 '06 #1
7 1354
maya <ma********@yah oo.comwrote:
hi,

I'm following example 'Intro7.aspx' here,
http://www.csharpfriends.com/quickst...px#customctrls
I think we could answer these questions, but there would be more to follow ...
a lot more. Honestly, I think what you really need is a good book to sit down
with and learn.

Since you are working with an ASP application, consider:

http://www.bookpool.com/sm/0470042583

Or, if you really just need C# (my recommendation to start), how about:

http://www.bookpool.com/sm/0735621292
or
http://www.bookpool.com/sm/0764578472

it says on top of Acme.cs "namespace Acme" I assume this means Acme.cs
has to be in a dir called 'Acme'? (am assuming namespace is equiv to
Java's packages; is this right?)

at any rate I can't compile Acme.cs.. get errors (I'm compiling in
command line, thus: csc.exe Acme.cs.. get lots of errors, dealing mostly
with obsolete stuff..)

I'm also confused about two other things:

1) I don't see this, CodeFile="Acme. cs" anywhere in aspx.. (going by
what I see where I work, just started working here & trying to learn
.NET..)

2) Acme.cs starts with

public class Calendar : Control, IPostBackEventH andler,
IPostBackDataHa ndler

but Control is a class, not an interface (can u implement classes?)

thank you.
--
Thomas T. Veldhouse
Key Fingerprint: 2DB9 813F F510 82C2 E1AE 34D0 D69D 1EDC D5EC AED1

Jul 17 '06 #2
Thomas T. Veldhouse wrote:
maya <ma********@yah oo.comwrote:
>hi,

I'm following example 'Intro7.aspx' here,
http://www.csharpfriends.com/quickst...px#customctrls

I think we could answer these questions, but there would be more to follow ...
a lot more. Honestly, I think what you really need is a good book to sit down
with and learn.

Since you are working with an ASP application, consider:

http://www.bookpool.com/sm/0470042583

Or, if you really just need C# (my recommendation to start), how about:

http://www.bookpool.com/sm/0735621292
or
http://www.bookpool.com/sm/0764578472
ok, thanks, but this tutorial should include instructions so you can run
the example.. he doesn't even say the .cs needs to be compiled.. I
HAVE been looking at books, of course; have also seen this one,
http://www.amazon.com/gp/product/159...e=UTF8&s=books
anybody have any opinion on this one?

I'm a front-end developer here, but thought I'd try to understand some
back-end stuff to help me along.. I HAVE done back-end, mostly on Java,
but .NET is so different from anything I have ever seen, even the HTML
code is different with .NET.. so was just trying to learn the basics,
mainly re controls, etc..

thanks again..
>
>it says on top of Acme.cs "namespace Acme" I assume this means Acme.cs
has to be in a dir called 'Acme'? (am assuming namespace is equiv to
Java's packages; is this right?)

at any rate I can't compile Acme.cs.. get errors (I'm compiling in
command line, thus: csc.exe Acme.cs.. get lots of errors, dealing mostly
with obsolete stuff..)

I'm also confused about two other things:

1) I don't see this, CodeFile="Acme. cs" anywhere in aspx.. (going by
what I see where I work, just started working here & trying to learn
.NET..)

2) Acme.cs starts with

public class Calendar : Control, IPostBackEventH andler,
IPostBackDataH andler

but Control is a class, not an interface (can u implement classes?)

thank you.
Jul 17 '06 #3
maya wrote:
hi,

I'm following example 'Intro7.aspx' here,
http://www.csharpfriends.com/quickst...px#customctrls
>
it says on top of Acme.cs "namespace Acme" I assume this means Acme.cs
has to be in a dir called 'Acme'? (am assuming namespace is equiv to
Java's packages; is this right?)

at any rate I can't compile Acme.cs.. get errors (I'm compiling in
command line, thus: csc.exe Acme.cs.. get lots of errors, dealing mostly
with obsolete stuff..)

I'm also confused about two other things:

1) I don't see this, CodeFile="Acme. cs" anywhere in aspx.. (going by
what I see where I work, just started working here & trying to learn
.NET..)

2) Acme.cs starts with

public class Calendar : Control, IPostBackEventH andler,
IPostBackDataHa ndler

but Control is a class, not an interface (can u implement classes?)

thank you.
Hi Maya,
it says on top of Acme.cs "namespace Acme" I assume this means Acme.cs
has to be in a dir called 'Acme'? (am assuming namespace is equiv to
Java's packages; is this right?)
Not exactly. Unlike Java, class and namespace definitions within code-files
are not dependant on where they are in the file system. Basically, you can
put your code-file anywhere, and define any number of namespaces and public
classes in your code-file.
but Control is a class, not an interface (can u implement classes?)
You don't implement a class, you inherit a class. The syntax is valid, it's
the same as using the Java 'extends' clause:

public class Calendar extends Control implements IPostBackEventH andler {
...
}

--
Hope this helps,
Tom Spink

Google first, ask later.
Jul 17 '06 #4

"maya" wrote...

Thomas gave you excellent suggestion to where to begin, but I will anyway
answer some of the specific questions you had as well.
it says on top of Acme.cs "namespace Acme" I assume this means
Acme.cs has to be in a dir called 'Acme'? (am assuming namespace
is equiv to Java's packages; is this right?)
Not quite. Java's packages are used for both logical and physical
structuring, but in .NET it's "only" the logical structure.

You can have the source code anywhere you like, and the MSIL (roughly
corresponding to Java's bytecode) is put into an assembly.
public class Calendar : Control, IPostBackEventH andler,
IPostBackDataHa ndler

but Control is a class, not an interface (can u implement classes?)
Here it's actually similar to Java, that a class can extend only one
superclass, but implement many interfaces.

However, the syntax for extending and implementing is the same in C#, the
colon (:), which means that if it would have been Java, it would have looked
like:

public class Calendar
extends Control
implements IPostBackEventH andler, IPostBackDataHa ndler
/// Bjorn A
Jul 17 '06 #5
Tom Spink wrote:
maya wrote:
>hi,

I'm following example 'Intro7.aspx' here,
http://www.csharpfriends.com/quickst...px#customctrls
>it says on top of Acme.cs "namespace Acme" I assume this means Acme.cs
has to be in a dir called 'Acme'? (am assuming namespace is equiv to
Java's packages; is this right?)

at any rate I can't compile Acme.cs.. get errors (I'm compiling in
command line, thus: csc.exe Acme.cs.. get lots of errors, dealing mostly
with obsolete stuff..)

I'm also confused about two other things:

1) I don't see this, CodeFile="Acme. cs" anywhere in aspx.. (going by
what I see where I work, just started working here & trying to learn
.NET..)

2) Acme.cs starts with

public class Calendar : Control, IPostBackEventH andler,
IPostBackDataH andler

but Control is a class, not an interface (can u implement classes?)

thank you.

Hi Maya,
>it says on top of Acme.cs "namespace Acme" I assume this means Acme.cs
has to be in a dir called 'Acme'? (am assuming namespace is equiv to
Java's packages; is this right?)

Not exactly. Unlike Java, class and namespace definitions within code-files
are not dependant on where they are in the file system. Basically, you can
put your code-file anywhere, and define any number of namespaces and public
classes in your code-file.
>but Control is a class, not an interface (can u implement classes?)

You don't implement a class, you inherit a class. The syntax is valid, it's
the same as using the Java 'extends' clause:

public class Calendar extends Control implements IPostBackEventH andler {
...
}
thank you very much, Tom.. so the colon means: extend if class,
implement if interface.. interesting.. (just realized, btw, on this
example, since this is aspx and not a stand-alone .cs class, that I
probably need to do this in VS and run 'build' command, since .cs needs
to compile into a .dll and not .exe (when I compile with csc.exe in
command-line it compiles classes into .exe..)

again thanks...
Jul 17 '06 #6
maya wrote:
probably need to do this in VS and run 'build' command, since .cs needs
to compile into a .dll and not .exe (when I compile with csc.exe in
command-line it compiles classes into .exe..)
csc has a /target switch for choosing whether to compile an exe or dll.
For a .dll it is /target:library

Jul 17 '06 #7
Chris Dunaway wrote:
maya wrote:
>probably need to do this in VS and run 'build' command, since .cs needs
to compile into a .dll and not .exe (when I compile with csc.exe in
command-line it compiles classes into .exe..)

csc has a /target switch for choosing whether to compile an exe or dll.
For a .dll it is /target:library
thank you! :)
Jul 18 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2062
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html Unfortunately the binary for Python-2.4 isn't available yet and I'd hate to step back to a previous version. I'm glad I managed to set up my XP machine to being able to compile extensions using the VC++ toolkit which freely availbale from MS. See
3
3635
by: modemer | last post by:
Hello, I got weird compiling message similar like following when I compiled my simple code on Sun 5.8 with CC WorkShop 6 update 2 C++ 5.3. CC -g -o myclass.o -c myclass.cpp CC -g -o main.o -c main.cpp CC -g -L/usr/lib -lsocket -lnsl -o main myclass.o main.o __1cH__rwstdJ__rb_tree4CpknJmyclassHCSOCKET_nDstdEpair4Ck4n0BNCSOCKEVENTMGRJ SOCKEVENT___n0AL__select1st4n0G_C4__n0DEless4C4__n0DJallocator4n0G____Efind6
0
3053
by: David W. Fenton | last post by:
Today I was working on a hideous old app that I created a long time ago that does a lot of showing/hiding/resizing of fields on one of the forms. I had used constants to store reference values for many of the top/height/left settings. I noticed that some of the constants were defined by using other constant values, and I was impressed that VBA could do that. Here's an example: Const row1Top = 1.0208 * 1440 ' top of first row Const...
4
11344
by: Aaron Queenan | last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the following error message: Linking... LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport LINK : error LNK2020: unresolved token (0A000007) memset LINK : error LNK2020: unresolved token (0A000008) free LINK : error LNK2020: unresolved token (0A00000A) atexit LINK : error LNK2020: unresolved token (0A000028) wcscpy LINK : error LNK2020: unresolved...
2
1864
by: Rudy Ray Moore | last post by:
Hi guys, I just upgraded to "Visual Studio .net 2003 7.1 c++" from VS6. Some things I like (proper for loop variable scoping, for example), but some other things are troubling me. One annoying behavior is that the text editor often "hangs" (doesn't let me type) while compiling. Is there a way to fix this so it behaves more like VS6 (editor does not hang while compiling)?
1
1902
by: Jim Heavey | last post by:
Hello, trying to round out my knowlege here about compiling. To date I have used VS.Net to do all my compiling "majically", but I want to understand how to do it on my own, should the need ever arrise. It has been suggested to me that I should use the following pattern when compiling my programs, but I am not sure I understand the "pattern", Try creating a text file along the following lines where the /r are the dlls you are...
10
2185
by: Christina N | last post by:
When compiling my ASP.Net application, VS puts the new DLL under the local cached directory 'VSWebCache' in stead of on the server. How can I make it save the DLL file on the server when compiling? I have opened the source code project through 'File - Open - Open project from web..' Best regards, Christina
2
1949
by: Justin Naidl | last post by:
A group of friends and I are doing a RPG (role-playing game) maker for a school project. It occured to us, however, that if you want the user to be able to have almost complete control over the contents of his/her game, that you would end up with a tiny executable and a huge datafile. We wanted to keep clear of this as disk accesses take a lot of time to do and there would be a huge load of them to do this part. We could very easily...
8
2197
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the existing code. The options I've considered so far: 1. Create a new MC++ GUI project and add the *.c files to them and mark them with pragma unamanged. However, the /clr option does not compile *.c files, so I rename them to *.cpp, and now they...
0
1377
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help compiling code dynamically it may involve some reflection so if any one is any good in that field or compiling code this would be a great time to show me what you know. by the way my last weird but serious combo box error i solved my self it was just a simple recompile and some simple code changes and it worked. i will put a link to the code for compiling dynamially here: <a href =...
0
8403
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.