C# SmtpClient

I have a list of SMTP servers with usernames and passwords that I want to check, now I was wondering if the SmtpClient class (http://ift.tt/1ALjL2X) would be sufficient enough for me to make this work.

Can the SmtpClient be run asynchronous, as I would like to make this as fast as possible, thus creating multiple threads.

Thanks a lot people!

by darkyzzwow via /r/csharp

Help with Decimal to Roman Numeral

I have to convert a roman numeral to decimal and vise versa. The user enters two roman numerals in a form and adds them.

If they hit a button 'to decimal' it converts the text boxes to decimal.

When I use the button 'to roman' it isn't properly converting them back to roman numerals. This is what I have, I found it online and it isn't working. I know there is problems but I'm not sure where they are.

Instead of converting 10 to x, it converts it to 1. However many actual character the roman numeral's length is.

public string SetString(int intNum) { int m, d, c, l, x, v, i, n; string roman;

 m = intNum / 1000; d = ((intNum % 1000) / 500); c = ((intNum % 500) / 100); l = ((intNum % 100) / 50); x = ((intNum % 50) / 10); v = ((intNum % 10) / 5); i = (intNum % 5); n = m + d + c + l + x + v + i; roman = Convert.ToString(n); while (n > 0) { if (m > 0) { Console.Write("M"); m--; n--; } else if (d > 0) { Console.Write("D"); d--; n--; } else if (c > 0) { Console.Write("C"); c--; n--; } else if (l > 0) { Console.Write("L"); l--; n--; } else if (x > 0) { Console.Write("X"); x--; n--; } else if (v > 0) { Console.Write("V"); v--; n--; } else if (i > 0) { Console.Write("I"); i--; n--; } } return roman; } 

by spencerknows via /r/csharp

Looking for beginner guide that covers downloading and adding Prism to a WPF project

I'm new to Visual Studio and WPF, but am trying to start a basic project to learn Prism. I've played around with some MVVM stuff already but feel that I can benefit from the structure Prism provides. The problem is that no guides cover the most simple first steps: what happens after you've downloaded Prism. All of the guides I've found say that you need to add references to your project to various libraries (maybe not the right term?) that are provided by Prism, but when I look in the extracted Prism files I'm not able to find anything similar to what the guides are recommending. I'm sure it's some oversight on my part but I'm honestly not sure where else to look at this point.

The page I downloaded Prism from is here: http://ift.tt/1sIIQX4

by Vartib via /r/csharp

My dear Redditors, I need some ideas

First of all, I wanna be clear on something. I'm not lazy and I'm asking this here just because I want to create something bigger and better than an average student.

I don't want to create some simple CRUD application with a database and 2 tables where the most advanced part is hashing the password before saving it into the database.

I really want to learn C# and .NET in depth and I need your suggestions what to start developing.

It can be a desktop/web application, some service etc. The important part is, there needs to be a lot of different constructs like LINQ, EF, etc.

It could be from any domain (like math, machine learning and statistics, economy etc.) because I'm not afraid to learn anything new. I was thinking, since I need to invest my time in this, why wouldn't this be something really good.

If you, maybe, need some interesting project in your company, I'll be glad to develop something which can go into production, it's not a problem.

Thank you!

by warriorkitty0 via /r/csharp

[VS 2015 CTP] Don’t understand why it’s not finding the EF6 classes.

I'm a .NET veteran, and I downloaded the 2015 CTP to tinker around with some of the new features coming out.

I have used EF4 and EF5 extensively and am very familiar with its conventions and patterns and was attempting to setup a DbContext and get some code first DB schema generation going.

I have used "Add Reference…" to add a reference to both System.Data.Entity and System.Data.Entity.Design. I used Nuget to install EF6 to the project. If I check the properties of either in the references section of the solution manager, they point to valid paths for both dlls.

In the code editor, no errors are displayed, and if I hover over things like DbSet, it shows that it gets that it's a System.Data.Entity.DbSet.

However, when I compile, I get this: "The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) "

I have cleaned and rebuilt a couple of times, and that didn't make a difference.

by ExistentialEnso via /r/csharp