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, IPostBackEventHandler,
IPostBackDataHandler
but Control is a class, not an interface (can u implement classes?)
thank you. 7 1343
maya <ma********@yahoo.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, IPostBackEventHandler,
IPostBackDataHandler
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
Thomas T. Veldhouse wrote:
maya <ma********@yahoo.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, IPostBackEventHandler, IPostBackDataHandler
but Control is a class, not an interface (can u implement classes?)
thank you.
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, IPostBackEventHandler,
IPostBackDataHandler
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 IPostBackEventHandler {
...
}
--
Hope this helps,
Tom Spink
Google first, ask later.
"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, IPostBackEventHandler,
IPostBackDataHandler
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 IPostBackEventHandler, IPostBackDataHandler
/// Bjorn A
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, IPostBackEventHandler, IPostBackDataHandler
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 IPostBackEventHandler {
...
}
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...
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
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! :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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?...
|
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...
|
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...
|
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...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |