|
I was in your exact same shoes a few months ago. I first bout Petzold's book, but it was really more about deep internals of Windows than just learning the C# language. A good reference, but not good for learning Windows programming in C# for first time.
I went to Amazon and made a list of all the "contenders" and I ended up getting
C# for Experienced Programmer's by Deitel&Deitel. It's basically the as the "how to program in c#", plus extra chapters for somebody who already has a little experience.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
OK, I'll check that one too.
Thank you all for your replies.
-------------------------------------------------------------------
* Only drug dealers and computer programmers call their clients 'users'...
* Pardon me for the poor English.
|
|
|
|
|
Yep, I'm sure I'll buy this one. Everybody recommended this book, however this isn't a 'first book on the language' option.
Thank You.
-------------------------------------------------------------------
* Only drug dealers and computer programmers call their clients 'users'...
* Pardon me for the poor English.
|
|
|
|
|
Deliveries to Israel are expensive with commercial companies/web sites . There are some good online stores here too.
Thanks.
-------------------------------------------------------------------
* Only drug dealers and computer programmers call their clients 'users'...
* Pardon me for the poor English.
|
|
|
|
|
The best book for learning C# is Inside C# by Tom Archer, MSPress. Tom only uses Console apps, and he goes very in depth on almost everything you could ever want to know about C#. He even compares it to Java occasionally.
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
Just to let you know - I ordered "Inside C# by Tom Archer" and "Professional C#". I'm sure I'll use MSDN...
Thank you all for your advice.
-------------------------------------------------------------------
* Only drug dealers and computer programmers call their clients 'users'...
* Pardon me for the poor English.
|
|
|
|
|
Thanks for the update....I was kind of curious to know what book(s) you would go with.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Hi there,
I want to split up my app into a GUI part and the some "working" parts behind.
Which means to access certain parts of the GUI (e.g. Listbox) and fill it with data generated in nother methods of other classes.
For me as a newbie i could maybe imagine some ways to do it, but what's the professional approach on that one? Are there any tutorials around related to that?
thanks a lot in advance,
stonee
|
|
|
|
|
Yes, there are many avenues for breaking the GUI up and having business and/or data logic.
In .NET it is so easy to use libraries (DLLs) that makes a long term (old fuddy duddy) like me, have to rethink my old logic. Now that working with modules are so easy, it calls out for a greater object oriented design. It is what COM was supposed to be with all the hassle.
You can find many different articles right here on CP or go to msdn.microsoft.com and search for "n-tier". There are many things on their about breaking an application up into modules (tiers).
By using a modular approch to your application, you can replace you business logic without having to redistribute you GUI, or switch database sources without having to modify your business logic or GUI.
To even add more of a reason, with .NET, remoting and web services offer even more bang for seperation. If it is modular from the start you might remote out your business logic and data logic to reside out on a server or distribute it amongst different machines. Really easy to do with .NET. Flexible!
Of course, all this only matters if you application is something more than a simple one screen program to display some data. It really all depends on the type of application.
Rocky Moore <><
|
|
|
|
|
Ok, thanks for that.
But just for my understanding;
I have a method in class a, providing a certain information.
internal void OnAnswer(object myobject) <br />
{<br />
myobject.message<br />
}
and my main class
public class Form1 : System.Windows.Forms.Form<br />
{<br />
<br />
private System.Windows.Forms.ListBox listBox1;<br />
}
what's the best approach to add myobject.message to my listbox?
and what's the easiest one?
thanks again,
stonee
|
|
|
|
|
If you your main class knows about your class taht you have the 'OnAnswer' in, you could use a delegate to notify your main class to feed the listbox. You could also pass the listbox to the other class and have it fill it for you. Personally, I would rather have the delegate trigger an event that the main class picks up. You can pass the message in the delegate to the main class.
Rocky Moore <><
|
|
|
|
|
Say I've got some type of collection (usually an ArrayList), and I need to itterate through it, call some methods, and possibly remove one or more of the elements. You cant modify a collection while enumerating through it. If its an Array I could access it with an index variable, but then I need to always check if the size has changed and adjust for that (which is incredibly tricky because you dont know which element was removed and whether you need to readjust your index value or not). Are there any elegant ways of doing this?
Heres what I mean
<br />
for(int i=0; i < m_objects.Count; i++)<br />
{<br />
PhysicsObject obj2 = (PhysicsObject)m_objects[i];<br />
<br />
if(obj2 == obj)<br />
continue;<br />
<br />
if(rect.IntersectsWith(obj2.getBoundingBox()) || rect.Contains(obj2.getBoundingBox()))<br />
{<br />
obj.onCollision(obj2);
obj2.onCollision(obj);
}<br />
<br />
}<br />
This may be more a design problem. I can think of a few ways to hack around this (dont delete objects inside of onCollision, just put them in a queue to be deleted after all collision detections are done), but Im hoping theres an elegant way to itterate through a collection and be able to remove elements without stepping on your toes.
Thanks for any help
Dave Ratti
|
|
|
|
|
You could have the OnCollision method return a bool indicating if the method has removed an object who`s index is smaller or equal to i and then do i--;
if(obj.onCollision(obj2) || obj2.onCollision(obj))
{
i--;
}
|
|
|
|
|
Look into an "Iterator" design pattern. I'm not sure...there might even be an interface for it in the .NET framework.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
I have a problem. I can't get my programs (or the examples on this website) to run on other computers without a major headache.
I've been writing a program using C# and DirectX. I thought that the target computer would need: .NET Runtimes and the latest vesion of DirectX (9). But, my programs don't (nor the examples on this site) work in that configuration.
I had to download the DirectX 9 SDK runtime to get my program to work. That is a HUGE file! I got my friend to download the same thing so I could show him my progress and it fubar'ed his computer.
This is not good. What do you need to do to make your programs distributable? Is there something I'm doing wrong?
EvilDingo
|
|
|
|
|
AFAIK the DX9 runtime install the managed libraries to the incorrect place. The easy way out would just be to copy all the managed dx assemblies u need to the local directory, not too big!
HTH
<a TITLE="See my user info" href=http:
|
|
|
|
|
It looks like that did the trick!
Is this something they're going to fix in the near future? Adding a few extra small files is definitely something I can live with, but even so, we shouldn't have to.
Thanks for your reply!
EvilDingo
|
|
|
|
|
Pleasure
<a TITLE="See my user info" href=http:
|
|
|
|
|
Isn't this something that was fixed in DirectX 9.0a? I was having problems with the IDE even finding the proper files until I installed this new version and then they went away.
|
|
|
|
|
How do i make a Label control automatically resize itself vertically to show the next line of text? The autosize property couldn't help me as it only resize horizontally, making it extremely long.
Thanks.
Weiye, Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
Hi,
I am a degree student doing my final year project. I am writing a proxy server using HttpWebRequest & HttpWebResponse classes. I managed to redirect the request, and get the response.
But when I am half-way writing to the socket (to pass the content to the browser), I got a System.Net.Sockets.SocketException with message:
"An established connection was aborted by the software in your host machine"
It seems that IE timed out too fast or sumthing. How can I solve the problem?
I am quite new to .NET. Please help. Maybe some of you can tell me some ways to discover reasons for exceptions in .net. msdn library doesnt seem to help...
|
|
|
|
|
viperxp wrote:
System.Net.Sockets.SocketException with message:
"An established connection was aborted by the software in your host machine"
Have a look at the callstack and see what caused the problem. You might need to use asychronous mode.
<a TITLE="See my user info" href=http:
|
|
|
|
|
Thanks man.. I solved the problem.
|
|
|
|
|
Visual Studio.NET is installed or not?
My application needs an assembly which is installed part of Visual Studio.NET.
Thx
Never take a problem to your boss unless you have a solution. This signature was created by "Code Project Quoter".
|
|
|
|
|
Kant wrote:
Visual Studio.NET is installed or not?
Ermm, look for it In the registry....
<a TITLE="See my user info" href=http:
|
|
|
|