|
I am writting a code in vb.net, How can i convert it into the similar code in c#?
|
|
|
|
|
you are new here, and should read the forum guidelines; see "how to get an answer" on this page.
"help needed" is not informative. That is a reason why your earlier posts got down-voted.
why do you write in VB.NET if you need C#? do you know C# at all? if not, forget it (i.e. study it thoroughly or don't use it at all).
there are converters, some big, good, expensive; and some small and free, like this one[^].
|
|
|
|
|
you must learn C#, there is no other solution to your problem!
|
|
|
|
|
Isn't there? What about the automatic code converters? How do you think that Reflector works?
|
|
|
|
|
Reflector decompiles an assembly to .net language C# or VB.net or MSIL,
and the "there is no solution" means "to encourage him to learn c#"
|
|
|
|
|
Then that's what you should say to the OP. As he's inexperienced, he may just take you at your word.
|
|
|
|
|
|
See the below links
http://www.developerfusion.com/tools/convert/vb-to-csharp/
http://www.dotnetspider.com/convert/Vb-To-Csharp.aspx
these are the online tools for convert code Vb.Net to C#.
|
|
|
|
|
If you are using VS2008, you can download the MoXAML PowerToys referred to in my sig, and run the BabelCode functionality there to convert from C# to VB.NET or vice versa.
|
|
|
|
|
|
Hi All!
In C# ,VS2010 :
Let's say I assign a tag-property for a TreeNode-object with an IShellFolder-object. What do VS really store in the Tag-property? Do the framework hide all the gruesome memoryhandling for me and internally just store a pointer to the IShellFolder-object, or do the memoryuse just increase the further I recurse into the Folder-tree?
I have been programming for some years, but have no formal education on computing, except for some MCP-courses.
Someone knows what I should read or some good sources for explaining this?
TIA, Load_error
------
On Error Goto Hell
|
|
|
|
|
IMO you should learn a language, or any new technology, from a book you buy and study; and study again one year later. Memory management is pretty automatic in .NET
|
|
|
|
|
Well, to reduce the memory-footprint is not just a matter of reading, it is (together with memory-leaking and multithreading) some of the stuff I find most difficult to debug (like the half-assed CLR-implementation GC, what does it really collect?!? What should I release with Marshalling, etc ?!?).
Desktop developers have got a christmaspresent from MS every time they release a new OS, like they think "how to break any existing code" every time...
I started out in the VB3 days (Win95 / -stuff), and seem to re-create libraries for (almost) the same things over and over again.
Your answer did not help much, either...
Regards, Load_error
|
|
|
|
|
|
can some one help me to save the email sent by a user to my email id, in a sql server 2005 database.
|
|
|
|
|
Maybe. Have you actually tried something? If so, what have you tried and where are you experiencing problems?
|
|
|
|
|
yes.. i have done something like ..
TcpClient tcpclient = new TcpClient();
tcpclient.Connect("pop.gmail.com", 995);
System.Net.Security.SslStream sslstream = new SslStream(tcpclient.GetStream());
sslstream.AuthenticateAsClient("pop.gmail.com");
System.IO.StreamWriter sw = new StreamWriter(sslstream);
System.IO.StreamReader reader = new StreamReader(sslstream)
but i m not getting the exact data
|
|
|
|
|
Ok, so you have no clue about how to develop a POP client. It is not bad, everybody has to learn but, please, in these cases, instead of asking for a complete solution for you to copy/paste it, I think the first thing you should do is this[^]. Read, learn and research, and make a concrete question when you find a concrete problem on your research, becouse other way you will only learn "copy/paste" programming language, which is not a language at all.
|
|
|
|
|
Why not you can do it but for this you need to know Database is always a Back-End and to Communicate Back-End you need to Create a Front-End which is responsible for Holding or Communicating your Email.
Have you try something..
|
|
|
|
|
i am not getting anything. i know but i am not getting how to do that. how to create the code for this?
|
|
|
|
|
Rachit Barjatya wrote: i am not getting anything. i know but i am not getting how to do that. how to create the code for this?
for back end you should know about sql or for front end you should know about C#, whatever this is your cup of tea and no will serve it for you.
|
|
|
|
|
this is the following error i have
There is already an open DataReader associated with this Command which must be closed first.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.
|
|
|
|
|
|
Don't create a mess, there is no need to start three different threads about a single problem. Please stick to the original thread, and either edit your existing post or add new messages in that thread.
|
|
|
|
|
If you want to open multiple data readers on a single connection, and you have SQL Server 2005 or later running, you need to enable MARS (Multiple Active Result Sets). To enable it, add
MultipleActiveResultSets=True to the end of the connection string.
|
|
|
|