|
i could not find the system.management namespace
please help......
|
|
|
|
|
Have you tried adding reference to a .net library and search that list for System.Management.
System.Management dll is in .net since 1.1 version.
|
|
|
|
|
|
Hey every body. I was going to develop a Software which transfers voice and data(in advance I may add Video) in a local network(LAN) for my final Project in my college which helps me to have a good result ............................ So please every body help me on the Pre-requisite ............. i.e tell me ideas as much as you can, which helps me to develop this nice project................................I decided to do the software using C# language.............. Any suggestions!!!
THANK YOU ALL
|
|
|
|
|
So you decided to do this project in C#, without knowing the pre-requisites.
You asked for ideas, so here goes. Find out what you need as prerequisites first, then decide on a language, based on its ability to easily implement that functionality.
Either the course you are on is not very good, or you were playing hookey on the days they covered Planning and Design.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hey dude .... do you think that I am dull?..... do you think that i decided to do such kind of projects without knowing any thing........... I think if u thought like that it is far from the truth ............ You better said to me "keep it up.... do this and dont use like this " and bla bla bla ................... I decided this language because I am good at it than the others(like VB,JAVA,C++) and others .............. so what do you say now?
thank you
|
|
|
|
|
First of all I never said that you were dull. I don't know you, how on earth would I know your mental abilities.
Secondly you are not going to get very far in anything related to programming if you cannot accept being told that your approach/schema/design is not the best way to do a particular task.
As far as keep it up etc. goes, do keep it up. Consider, however, that once you have found the prerequisites for VOIP and it transpires that what you need has not yet been implemented in C#. Do you have the skills to code something this complex from scratch yourself? If so then by all means continue as you are.
In your original post you asked for opinions. I gave mine and it was, and remains,
"Find out what you have to do before deciding on the language to use"
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Ok dude................ Thanks for the suggestion........ You know what............ When you say "it has never been implemented in C#"............ I dont believe that if any body doesnt do it that means i cant do it,,,,,,,,,,,,,,,,,, but I will try my best to come up with the design,,,,,,,,,,,,,,, but the only language I can confidently say is it is C# ,,,,,,,,,,,,,,, I wish i could know more but................ I must have to concentrate on one a specific language and be a master of it for my self............... any says I WILL broaden my thoughts as far as i can............. Thank you
|
|
|
|
|
I did not say "it has never been implemented in C#", I said "What if you find that it hasn't".
But that doesn't matter. Your reply shows a commendable attitude, and I hope that you succeed. Even if you are doing it backwards.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Does anybody know of any simple tutorials on Plugin Architecture that I can wrap my little brain around? I have read quite a few in the past 48 hours and seem to be having difficulty getting my head around it.
While the tutorials/articles were very informative, I found that the projects they created for the articles were very overwhelming and a little too complex for a noob.
Also, I have found a few links relating to the System.AddIns namespace on the MSDN site, but that just made me even more confused because it's completely different from all the other articles I've read. Can anyone offer any advice/ help on this?
Thanks heaps,
jase
|
|
|
|
|
|
Yay thank you very much Curtis, that was very helpful and much appreciated.
Thanks
jase
|
|
|
|
|
No problem! I'm glad I could be of help.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi,
How to Extract/Search Document,Excel-Sheet,etc using Indexing Services
Can anybody give me example.
|
|
|
|
|
I wrote
Random RollOne = new Random();
Random RollTwo = new Random();
dieOne = RollOne.Next(1, 7);
dieTwo = RollTwo.Next(1 , 7);
sum = dieOne + dieTwo;
but dieOne and dieTwo are always equal, how do you make two independent random values?
Edit:
Thanks Mikanu, it works now.
modified on Monday, July 13, 2009 10:43 PM
|
|
|
|
|
The correct way to do that is to create an instance of the Random class and then call one of the following methods:
- Next(Int32 max) // will return a random number smaller than max
- NextByte() // will return a random byte (between 0 and 255)
-
NextDouble()
Here's a code sample which will generate two random numbers, a and b, between 0 and 10
Random rnd = new Random();
int a = rnd.Next(10);
int b = rng.Next(10);
----
<a href="www.mdinescu.com">www.mdinescu.com</a>
|
|
|
|
|
To add to the other post ( which was correct ), there is no such thing as a random number to a computer. It only looks that way. A random sequence is started by what's called a seed value. You can specify a seed value to regenerate the same pseudo random sequence if you need to. If you don't specify one, the current date and time are used. As you can see, you created two random objects with the same seed, so they will both start on the same number.
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.
|
|
|
|
|
You should create one instance of Random as a static field of the class and use it whenever you need it.
It should never be a local variable of a method.
|
|
|
|
|
Hello everyone,
I'm looking for a way of monitoring the incoming ping requests on a machine, I'm looking specifically for the Requesting host (IP or name, either works) and the size of the request. Does anyone know if this is possible with C#?
Thanks
modified on Monday, July 13, 2009 9:50 PM
|
|
|
|
|
I don't know how to do it in your code...
But here is a tool:
http://www.wireshark.org/[^]
(+ I Think you can't on Vista, some times ago I tested a C# sniffer code, but it broke on Vista, some socket required functionality being disabled on Vista, for security reason!)
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
I have inherited a load of code and I am seeing things that I find troubling but Im not sure how serious they are. Im coming from years of experience with C++ and java, but Im relatively new to C#.
Some troubling things....
- One class is 5500 lines alone, another 4000. These are STATIC classes! I have never seen so many statics in one codebase before. Classes, methods, variables, etc. Lots of classes like this. My philosophy has been to prefer instantiable singletons over statics unless it is a small lightweight utility class. Is there a good reason to have so many statics?
- I have classes with over 20000 lines of code in ONE class. Not static thank god but still. There are probably about 15 classes over 10000 lines each. How can I refactor or manage this code? Lots of cut and paste obviously.
- There are 180,000 lines of code, and only 2 namespaces encompasing all of it. Shouldn't namespaces be used similar to packages in java? Each package helps to break down the code base into functional groups, right? Or is a namespace in C# different?
These seem like reasons to be concerned, if not run out the door right away... thoughts?
|
|
|
|
|
saxisa wrote: Is there a good reason to have so many statics?
It's just an idiom. I prefer to write static classes, but a class with a static Instance property works just as well. What is the difference ? If a class does not have state, then static makes sense to me.
The big classes are another thing.
saxisa wrote: How can I refactor or manage this code?
If you want to seperate in to smaller files, then you need to use partial classes. If you want to create smaller classes, it's up to you to decide how to break one class in to many.
saxisa wrote: There are 180,000 lines of code, and only 2 namespaces encompasing all of it. Shouldn't namespaces be used similar to packages in java?
Namespaces work in a similar way to C++, but dumbed down a little, like most of C#. I like to break things up in to folders when I create a project, and inherit namespaces from there, but I don't see anything inherently wrong with having less namespaces, so long as nothing clashes.
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.
|
|
|
|
|
Christian Graus wrote: It's just an idiom. I prefer to write static classes, but a class with a static Instance property works just as well. What is the difference ? If a class does not have state, then static makes sense to me.
Yes, It's just an idiom. But do you think creating a class (static) is reasonable just for grouping a set of methods? This is where C++'s free (non member) functions takes advantage. It will not force to create classes just for putting some methods. I really wish to see free functions in C#.
|
|
|
|
|
Hi,
I agree with what Christian said. I'll add some in my own words:
1. I don't mind static classes or singleton classes. When there is no state at all I think I'd prefer a static class over a singleton, since there is no real use in an instance then.
2. I don't mind large classes if they make sense. If they can be logically split into smaller ones, I'd go for that. Although it puts more burden on the user (remembering which method is in which class).
3. I would mind large methods very much. When refactoring, I'd go for smaller methods, and probably some internal helper classes. And use many files. I tend to keep files smaller than 400 lines.
4. yes namespaces are like packages (without the relation to folders though); having only a few does not hurt, until you get name clashes.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
In C#, I prefer static classes to classical singletons. I believe static classes were created to provide a more fool-proof way of writing singletons.
Big classes and big methods may be a code smell, but if you can't find ways to reduce them then they're fine. Some times classes and methods just need to be big.
I use only a few namespaces; I may have X.Y.Data , X.Y.Library , X.Y.Forms , etc.
I don't know Java, but I would assume that a .net assembly would be similar to a package.
An assembly may contain many namespaces, and a namespace may span many assemblies.
|
|
|
|
|