|
Jacob Dixon wrote: My fear is not being able to find a job as a programmer since I personally feel my experience is not good enough even though I will have "paper" that says I can.
I have no formal training at all. You'd be surprised how much a passion to learn, a willingness to admit that you don't know something, and a proven ability to teach yourself, can count for more than a degree.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am hoping so!
I noticed your signature "Driven to the arms of OSX by Vista".
LOL
Funny thing is I bought a iMac after I bought a HP laptop with Vista
I just can't develop anything that good on anything other than Windows (yet)
|
|
|
|
|
Jacob Dixon wrote: I just can't develop anything that good on anything other than Windows (yet)
The tools and languages for Mac development are no-where near as advanced as under Windows, although I do think Core Animation is well put together, overall, Windows is definitely easier to work with, programming wise.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Majority of people use Windows anyways.
Well looks like I'm going to purchase another book. The site you suggested recommends: ".NET and COM: The Complete Interoperability Guide".
Thanks
|
|
|
|
|
The System.Array class implements several interfaces such as IList , IEnumberable , and so on. However, when defining an array of specific types such as string[] or Foo[] I have noticed those implement the generic versions of IList<T> and IEnumerable<T> .
I am at a loss where this is defined. For instance, I know that arrays are reference type object derived from System.Array , however looking at the IL I see no formal implementation of this.
It would be really nice if the SDK documentation would fill me in on these details, particularly the interfaces that are implemented. I have not seen where IList<T> and IEnumerable<T> are tagged on to System.Array and there is no System.Array<T> .
How am I supposed to know that string[] implements IList<string> and IEnumerable<string> if it isn't documented?
|
|
|
|
|
see Important Note[^].
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
CaptainSeeSharp wrote: IEnumberable
Brilliant.
CaptainSeeSharp wrote: How am I supposed to know that string[] implements IList<string> and IEnumerable<string> if it isn't documented?
I guess you'll have to wait for the youtube video to explain it in a format you're used to.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
CaptainSeeSharp wrote: How am I supposed to know that string[] implements IList<string> and IEnumerable<string> if it isn't documented?
It is documented. You actually have to READ the documentation in order for it to be explained to you, as Luc has already pointed out where it is.
|
|
|
|
|
Dave Kreskowiak wrote: You actually have to READ the documentation in order for it to be explained to you
Oh...interesting. What a novel concept.
I don't have time to read through moutains of documentation looking for a needle in a haystack. I was looking where I expect to find what interfaces a type implements. I shouldn't have to look at it through a microscope to find it.
|
|
|
|
|
The docs on System.Array isn't exactly a needle in a haystack.
CaptainSeeSharp wrote: I don't have time to read through moutains of documentation
Then you don't have time to write code either.
|
|
|
|
|
the link I provided was the first result for "MSDN online" when I entered "array class" in Visual's search page. I never saw a haystack, it took me all of 10 seconds to get it.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I have been searching all over for an answer, but I have fallen back to asking the programming geniuses that frequent this site.
I am looking into a way to call different methods within a class. The problems are, in the class there are lots of methods and many of the methods are similar in function. So I am looking for a way to put the methods in a hierarchy within the class, but namespace can't be called within a class.
Hopeing for the class to resemble something like:
namespace IEWindow
{
public class Main
{
public void Method()
{
}
public ... NavigationBar
{
public void Method()
{
}
public ... Forward
{
public bool Method()
{
}
}
public ... Back
{
}
public ... AddressBar
{
}
}
}
}
*Note, in reality this will contain as many as a few hundred methods;
and to be used like
IEWindow.Main IEWin = new IEWindow.Main();
IEWin.Method();
IEWin.NavigationBar.Method();
bool g = IEWin.NavigationBar.Forward.Method()
Any help, even a statement like 'This is impossible, but thanks for humoring me', would be greatly appreciated.
|
|
|
|
|
I'm not sure what you're describing.
In C# you can declare classes within classes, but you can't declare methods within methods.
|
|
|
|
|
not really a method within a method, just a way to create a hierarchy that contains methods within a class. With namespace i know you can create exactly what I am looking for, but it doesn't work within a class. I can do without this ability, but that would mean 100's of methods would be sitting in my class without any organization, meaning the method names would end up being unnecessarily complicated and hard to distinguish one group of methods from another.
I would just rather be calling:
bool g = IEWin.NavigationBar.Forward.Method()
instead of:
bool g = IEWin.NavigationBar_Forward_Method()
|
|
|
|
|
Then you may want to declare classes within classes, but agregation may be a better technique. You may also want to use partial classes to help manage the code.
|
|
|
|
|
If you are using. Net 3.5 you may want to look at the function and action delegates
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
MafiaMoe wrote: in reality this will contain as many as a few hundred methods;
I'm not sure what reality you are living. A few hundred methods?!?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
My reality is a little strange...
The program creates a .dll that has a single class and usually around 10 to 20 methods, but could be in the hundreds depending on how it is used.
|
|
|
|
|
Hundreds of methods?? I'd scrap the library and use something that is better organized and not so convoluted.
|
|
|
|
|
MafiaMoe wrote: IEWin.NavigationBar.Method();
bool g = IEWin.NavigationBar.Forward.Method();
for this to work, NavigationBar must be:
- a public member or property of IEWindow;
- an instance of some other class that has:
- a public Method() method.
- a public member or property called Forward, which is itself an instance of some other class that has a Method() method.
Conclusion: you build a hierarchy of classes, and provide either data members holding, or properties returning, an instance of some child class (which could or could not be an inner class, your choice). So you could do hundreds of different operations on IEWin although IEWindow itself does not have to offer hundreds of methods, it all becomes one big hierarchy (or tree).
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Add(String GUID, String name, NetProtocol net, String ServerName, Int32 port, String UserName, String Password)
that is a method, but now i need to check all variables if are null or empty. If any one does not match, it would throw expection.
I don't like too many if statemnts, is it possible to put everything in one If line?
|
|
|
|
|
Saksida Bojan wrote: is it possible to put everything in one If line?
Have you forgotten what you learned while reading your first C# book? you can build complex expressions, e.g. using the logical AND and OR operators.
However, the user of your class/method won't like it when your method gives a single exception saying "some parameter is wrong". You really should use one IF per parameter as a minimum.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
What makes you think he ever read a book ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
That was a suggestion in disguise.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Is it something like this?
if (name == null || name.Equals("") || ServerName == null || name.Equals(""))
Yes i have read C# book, but quite while ago. And once i have tried using with many OR operators, i didn't got the desired results
Luc Pattyn wrote:
However, the user of your class/method won't like it when your method gives a single exception saying "some parameter is wrong". You really should use one IF per parameter as a minimum.
This class isn't part of GUI.
|
|
|
|