[.net] General C#, Tao, ... questions

Started by
11 comments, last by realJJ 19 years, 5 months ago
Hello guys I have some general questions about C#, and other C# related things. 1.) How can I use the xml documentations from my dlls in other projects? I want to see the <summary> </summary> blocks if I move the mouse over a class from my dll. It works if I use the Tao. librarys. But how about my own? :> 2.) What is the difference between Tao.Sdl and SDL.NET ? SDL.NET uses the Tao.Sdl bindings? Which one should I use? SDL.NET doesn't has the sdl sub librarys?! ( SDL_Image, etc... ) 3.) C# doesn't support const functions, function params, right? Any chances that C# 2.0 will support them? 4.) Mono / Unix doesn't support winforms. (?!) What should I use instead? ( I am using OGL. ) 5.) C# doesn't support normal fucntions outside a class ?! Eg:

namspace bla
{
   int myBla( int bli,int bla, bool blo );
}


6.) How can I make namespace xml- summarys? Thank you, for you answers. :P :) [Edited by - rakoon2 on November 1, 2004 2:58:22 AM]
Advertisement
Quote:Original post by rakoon2
Hello guys I have some general questions about C#, and other C# related things.

2.)
What is the difference between Tao.Sdl and SDL.NET ? SDL.NET uses the Tao.Sdl bindings? Which one should I use? SDL.NET doesn't has the sdl sub librarys?! ( SDL_Image, etc... )

SDL.NET requires Tao.Sdl, since it is a C# wrapper around the Tao.Sdl library. Tao.Sdl is a strict translation from C to C#, without any object-orientation. SDL.NET makes it look more like C# code. SDL.NET is probably what you want to use, but I only started playing with it yesterday.

SDL.NET is also a work in progress; it needs quite a bit more work to be truly production-ready.

Quote:Original post by rakoon2
4.)
Mono / Unix doesn't support winforms. (?!) What should I use instead? ( I am using OGL. )
Use SDL (SDL.NET or Tao.Sdl), since it's supported on both, and supports OpenGL. Tao is included as part of Mono. WinForms is only necessary for Windows-GUI-style programs; you don't need nor want WinForms for game development.
Heh, ok thank you for your answers.

4.) Yes, but what if I want to make an editor. Well, I could write my own gui- library that uses opengl / sdl. ( My old C++ engine had a simple one. )
Quote:
C# doesn't support const functions, function params, right?
Any chances that C# 2.0 will support them?

No. .NET 2.0 does not support const function params in c#. Look at using ref and out to get the behavior that you want.

Quote:
5.)
C# doesn't support normal fucntions outside a class ?!

No, but you can put a static method in a sealed class. You can probably even name the class the same thing as your namespace if you want.
namespcae Foo { //...}public sealed class Foo {  public static void Bar(){    //...  }}
Quote:Original post by rakoon2
4.)
Mono / Unix doesn't support winforms. (?!) What should I use instead? ( I am using OGL. )

GTK#?
Quote:
How can I make namespace xml- summarys?

Take a look at NDoc.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Good morning! Thank you for the help! :)


NDoc: Oh, im using NDoc. Let me take a look!

5.) Yes, I know a class full of static functions. Looks a ugly. :/ ( eg: Sdl.SDL_SetVideoMode(); vs SDL_SetVideoMode(); Well, I would rewrite SDL.SDL_SetVideoMode to SDL.SetVideoMode )


7.) One more question: ( :p )

What does:
using( Form1 frm = new Form1 ){  //..}

?


Thank you again! :P
The using statement is for use with classes that implement IDisposable. With the code you presented, the Form1 instance will be created as normal and the code in the braces will be executed (with frm in scope), but as soon as execution leaves the braces Dispose() will automatically be called on frm and frm will be out of scope. It has the same effect as doing
{    Form1 frm = new Form1();    //..    frm.Dispose();}

You can also do things like this:
using( Form1 frm1 = new Form1(), frm2 = new Form1() ){    // Both frm1 and frm2 will be disposed}Form1 frm1 = new Form1;using(frm1){    // frm1 will be disposed}
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
Ahh, thank you! :).

I can't find the .zip that contains the newest

SDL_video
SDL_image
SDL_ttf
SDL_mixer
SDL_event

dlls(.NET). http://cs-sdl.sourceforge.net/ does not has them? hmm...

Quote:Original post by joanusdmentia
With the code you presented, the Form1 instance will be created as normal and the code in the braces will be executed (with frm in scope), but as soon as execution leaves the braces Dispose() will automatically be called on frm and frm will be out of scope. It has the same effect as doing
*** Source Snippet Removed ***

If you want to be precise, it's more like this:
Form1 frm = new Form1()try{   // ...}finally{   frm.Dispose();}
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Quote:Original post by rakoon2
Ahh, thank you! :).

I can't find the .zip that contains the newest

SDL_video
SDL_image
SDL_ttf
SDL_mixer
SDL_event

dlls(.NET). http://cs-sdl.sourceforge.net/ does not has them? hmm...
Sure they do. Under Downloads->Supporting files. SDL_event and SDL_video are part of SDL; ttf, image and mixer are seperate.

This topic is closed to new replies.

Advertisement