For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
So explain what an "MD" file is - the only one I'm aware of is a Markdown text file, and that's trivial to read:
string text = File.ReadAllText(pathToFile);
Then explain what problem you are having reading and writing it - we have no idea where you are stuck, so we really can't help you yet.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
Hi, I am a beginner in C# and programming in general. I have a problem getting started with C#, and I need some tips for one project I'm doing for myself.
In general I need a list of items in a combo box, and based on the selection in the combo box I need some variables to take different values, then make calculations based on these values and produce a numerical result into a TextBlock.
For now I understand that I should do it like this (but I am missing a lot):
1. I made a class like this (in MainWindow.xaml.cs):
3. Now I need to somehow populate the combo box with different instances of my class, like:
<ComboBox.item1 = C37/>
ComboBox.item2 = C30/>
4. Then I need to create some variables based on the selection in the combo box and make some calculations, for example:
double a = 10;
double b = 20;
double CompressionStrength = C37.CompressionStrength;
double c = a*b*CompressionStrength;
5. And then I just need to print value "c" to a TextBlock in the WPF window.
Now I need to ask for some general guidance about this because I am a little stuck...
1. How do I populate combo box in MainWindow.xaml with names of my class instances that are in the MainWindow.xaml.cs?
2. How do I create a numerical variable from the class property and perform calculatons on it?
3. Is it even doable this way / what would be your suggestions for making this work?
Scenario: a non thread-safe .net assembly is accessed by a C# web service (multi-thread) and returns corrupted data when concurrent requests are issued due to sharing non safe data. The C# web service is consumed by a Java web site.
Actual solution: the C# web service implements by code a FIFO - First In First Out queue for the requests. With this approach, every web service call that redirects to the assembly go to the queue and is attended when the previous request to the assembly is finished. The assembly logic's performance is good and Users most time do not fell the delay caused by waiting in the queue. However it was a contingency solution and it is far to be the ideal solution.
Alternative options: load the assembly dynamically for each request and access the needed method at run-time
The code below compiles but there are syntax troubles:
Assembly pb_dll = Assembly.LoadFile("C:\\inetpub\\wwwroot\\rsasmPBService\\bin\\rs4pb2017asm.dll");
Type memberServicing = pb_dll.GetType("rs4pb2017asm.n_eas_member_servicing_iis");
string  args = new string;
args = orgId;
args = contactId;
object memberServ_Instance = Activator.CreateInstance(memberServicing);
object Result = memberServicing.InvokeMember("getmemberoptions_iis", BindingFlags.Default |
BindingFlags.InvokeMethod,null, memberServ_Instance, args );
Return Result ;
The assembly returns a data structure that each element of the structure is an array. The elements have different data types. The structure has to be sent back to the caller.
1. How to convert/cast the object "Result" into the structure format ?
2. In the above syntax, the arguments are passed to the assembly in an array of strings. However there are methods that expect to receive string and integer data as argument, for instance. So what could be a syntax to pass individual arguments, not an array?
I wonder why instructors continue to give homework assignments that can easily be resolved by a minimalist google search...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
I've been trying to implement Haar Cascade car classifer lass in order to detection vehicles in a video. However I can't seem to find anything on this. I'm new to Haar Cascade and EmguCV. Any help would be much appreciated, thanks in advance. All I have been able to find so far is:
public class HaarCascade : ICloneable