Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Rudolf Jan

@Rudolf Jan
About
Posts
73
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • You have been coding too long....
    R Rudolf Jan

    what's wrong with vi?

    Rudolf Heijink

    The Lounge

  • How was life before C#?
    R Rudolf Jan

    C++ and MFC. works great, but I don't like managed C++, this looks awful. One of the lovely things of C+= are the wizard templates, which are much better than for C#. I switched to C# mainly because it supports .NET, which is good and bad. Good because there are so many functions, bad because it is very complicated and takes a lot of time to learn. C# is a lovely language in may respects, but I don't like the way they treat arrays and strings. And I miss the convenience of the preprocessor.

    Rudolf Heijink

    C# csharp java delphi database wpf

  • Possibilities for 'Out of Memory Exception'
    R Rudolf Jan

    Most of the time this is caused by a very stupid programming error. It happened to me when I just started using C#, I did nogt completely understand the concept of properties and made a prperty assign to itself. It is difficult to give a general way out. Your best chance is to try isolate the probleme, but maybe you have to tear down your complete application to find out which line of code causes the problem. You may use breakpoints to find out where your application uses operations that appear to take a long time (normally it takes some time to fill such an amount of memory). Good bug hunting!

    Rudolf Heijink

    C# performance

  • Playing Sounds through the Speakers
    R Rudolf Jan

    I assume you want to use human speech, or you want arbitrary sounds? For your second question, look at phrases like speech processg, and LPC, You need some intensive processing to extract the pich and recreate the voice signal. These methods do not work for sounds in general. I don't think you will find samples on code project, you can use. Maybe the Micrososft speech processing APIs will help. (Don't know how they are colled exactly SAPI maybe?)

    Rudolf Heijink

    C# help question

  • Multiple Language
    R Rudolf Jan

    You can do it to a certain point. On code project there is a tool to translate resources, which works nice. Support from .NET is not really an improvement above the resource dll's you couldmake with MFC. If you'r really seriuos, there is a book about Internationalization focussing on .NET (look at Amazon for it). My recent experience is that it takes a lot of specific knowledge and it takes much time to make real multiligual applications. I.m Dutch and I love my laguage but I don't think I really want to invest so much time in this. An important thing is that you must include it from day 1 into yor design. Adding multi langauge support later on is very difficult and tedious to do.

    Rudolf Heijink

    C# data-structures question

  • Why din't MS include Multile inheritance in C#?
    R Rudolf Jan

    I think none of the answers is really convincing. Maybe you should answer that we cannot know the motivation of the guys not to include it. Simplicity and avoiding errors might be an argument. On the other hand C# is not a simple language. It includes many complex and new features. If you have the feeling the interviewer is not a fan of multiple inheritance you might say MI is an interesting idea, but you do not really need it in practical situations.

    Rudolf Heijink

    C# csharp oop question

  • memory exception
    R Rudolf Jan

    To me this happend when I created a non terminating recursion. Maybe you are hanging in some loop? Forgot to increase the index while creating new objects?

    Rudolf Heijink

    C# help csharp performance question discussion

  • Basic help guys
    R Rudolf Jan

    I suggest you buy a book on C# and study it. You will learn nothing from our answers. This looks a lot like home work. You will get stuck again in the next excercise and then maybe nobody here will be nice to you. Being a programmer is a great job but it takes a lot of pain to learn.

    Rudolf Heijink

    C# help tutorial

  • is it possible to do the following in C#?
    R Rudolf Jan

    What you want is against the basic principles of object oriented design and language. No you can't. I suggets you read a C# course book and focus on sections regarding properties. You vvcan attach mConnection to a public property, say you name it Connection. then you can say: comm.connection=d.Connection. You also can make teh member mConnection publc and then you refer to it as: d.mConnection

    Rudolf Heijink

    C# csharp help question

  • Exception handling..????
    R Rudolf Jan

    You should think about continuation that makes sense. You may return to an input for example, or substitute the illegal result with something that makes sense for you application. Just ignoring the exception is generally not a very good idea.

    Rudolf Heijink

    C# question

  • Is it possible to write such a methode?
    R Rudolf Jan

    This does not look like acceptable syntax. In C# you always should specify the parameter type in the declaration. C# does not support default parameters. If you intend your sample to mean a method call, private void are irrelevant qualifiers. I don't thing C# supports method calls with this syntax.

    Rudolf Heijink

    C# question

  • what is best way to create help ? and convert a word document to chm?
    R Rudolf Jan

    Word does not produce very efficient HTML code, but you may store a word document as HTML. Best way is to use an html editor th create all pages and import the in HTML Workshop to create the .chm file. It is abit more work, bur much more flexible. You can use full html, including style sheets (which I recommend to do). Do not forget to test the resulting chm file thoroughly, to make sure all your help texts just do what you want them to do.

    Rudolf Heijink

    C# question help

  • Deserialization question
    R Rudolf Jan

    The only solution I know is to store the type during serialization. When deserializing, first deserialize the type description and deserialize the object afterwards, using a switch statement for the type to deserialize. It took me a lot of time to find out how to do it. I will write an article about this subject for codeproject. I think it may be ready somewhere next week.

    Rudolf Heijink

    C# question xml json tutorial

  • xml serialization
    R Rudolf Jan

    Interesting tool at first sight. Does it support inheritance? Rudolf Heijink

    C# xml json tutorial

  • Inheriting !
    R Rudolf Jan

    There is posisbility to use inherited forms. (In the new item window). I tried to use this, but it does not work well with the form designer view (unfortunately). You can try to put all functional stuff in a separate class and use an object of this class in your form. You even can attach alle controls to control functionality you define in this class. Rudolf Heijink

    C# delphi help

  • sub forms ??
    R Rudolf Jan

    To behosest, no there are no good books that cover all topics of programming C#, object orientation and .NET to give you a structured background. I am an experienced C++ programmaer and for some time I am learning C#. If it is not working, you may try posting your code and the error messages you receive. It is difficult to see what you do wrong without code. Learning programming is a tough job. You need to understand lots of rules and concepts and you will make many mistakes. Maybe one practical tip: try to use intellisense in de Visual Studio IDE. For instance, if you just type: Form2 myform=new Form2( and wait a second, it shows you the required parameters. This may be very helpful. Stuyd the samples on Codeproject helps a lot and start with very simple applications. For learning C# and .NET I use following books: Programming C#, jesse Liberty (O'Reilly). I think it is reasoable good. Windows Forms2.0 programming, Chris Sells and Michael Weinhardt (Addison Wesley). usefull, but not really for beginners. Covers a lot of topics. .NET book 0 by Charles Petzold. Its about C# programming a good introduction if you have programming experience. You can dowload it for free from Petzolds website. Applied Windows .NET framework programming by Charles Petzold. Its old, you should buy his new book with somethiong like CLR programming in it. This contains mainly advanced stuff, but is usefull. There are more books, but either they are poorly written or advanced stuff or they stop where it gets really interesting. I did not find any complete overview explaining whats in .NET Rudolf Heijink

    C# question help

  • Serialization of arrays
    R Rudolf Jan

    Sad story, I think I understand much more now why things went wrong in my application. I will write an article about it for codeproject, so coming soon. Thanks anyway for your help. Rudolf Heijinbk

    C# xml wcf data-structures debugging json

  • sub forms ??
    R Rudolf Jan

    I suggest you take a beginners cource in C# first and study the chapters on classes and methods. You specify the a class Form2 with a constructor that reuqires an argument. So he compiler tells you to include the argument. In this cae, you want to pass a reference to the calling form, so you should specify: Form2 objeForm=new Form2(this) this refers to the current object in this case. Rudolf Heijink

    C# question help

  • Harry Potter 7 [No spoiler]
    R Rudolf Jan

    Just go on reading. There is indeed a moment Harry does not really know how to proceed. You must feel that in the book. I think this is OK. The end is really thrilling.

    The Lounge com question learning

  • Serialization of arrays
    R Rudolf Jan

    I did some additional tests. It seems the problem has nothing to do with lists, but possibly there is a bug in .NET. If I try to serialize two objects of the same type, I get the error message that I cannot serialize the same object twice. It mey be an error in the translation of the .NET error messages. I cannot check that. I have a Dutch Windows version trepresenting all .NET errors in Dutch. Below the code to demonstrate the problem:

    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Runtime.Serialization;
    using System.Xml;
    using System.Runtime.Serialization.Formatters.Soap;

    namespace Serialization
    {
    // Create a class to include in the list
    [Serializable]
    public class MyObject:ISerializable
    {
    public Int32 idx=0;

    	public MyObject(Int32 i)
    		{
    		idx=i;
    		}
    
    	internal MyObject(SerializationInfo info,StreamingContext context)
    		{
    		idx=info.GetInt32("Idx");
    		}
    
    	public virtual void GetObjectData(SerializationInfo info,StreamingContext context)
    		{
    		info.AddValue("Idx",idx);
    		}
    	}
    
    \[Serializable\]
    class ObjectList: ISerializable
    	{
    	MyObject object1;
    	MyObject object2;
    
    	public ObjectList()
    		{
    		object1=new MyObject(1);
    		object2=new MyObject(2);
    		}
    
    	protected ObjectList(SerializationInfo info,StreamingContext context)
    		{
    		object1=new MyObject(info,context);
    		object2=new MyObject(info,context);
    		}
    
    	public virtual void GetObjectData(SerializationInfo info,StreamingContext context)
    		{
    		object1.GetObjectData(info,context);
    		// here (netx statement) i get an exception, cmplaining i cannot serialize 
    		//the same object twice, though the objects are clearly not the same.
    		object2.GetObjectData(info,context);
    		}
    	}
    
    class Program
    	{
    	static void Main(string\[\] args)
    		{
    		ObjectList MyObjectList=new ObjectList();
    		FileStream WriteStream=new FileStream("test.xml",FileMode.Create); 
    		SoapFormatter bfor=new SoapFormatter();
    		MyObject Object1=new MyObject(1);
    		MyObject object2=new MyObject(2);
    		bfor.Serialize(WriteStream,MyObjectList);
    		}
    	}
    }
    

    Rudolf Heijink

    C# xml wcf data-structures debugging json
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups