|
Unless you are using Managed C++ (and even that is stretching things) this is utter rubbish.
C# may have been modelled on a mix of C++ and other languages but its resemblance is only passing. The main difference is that the framework is totally different. This means you have to find equivalents for things that look nothing alike and may operate in different ways.
For example, if you have an MFC application written in C++ using CView and CDocument classes then you will have to re-write those classes as C# has no direct equivalent. And what happens when you have a situation in C++ where there is a lot of low level memory manipulation? You can't do that easily in C#.
|
|
|
|
|
This is correct - for most of the C/C++ library and for low level memory manipulation you are better off starting from scratch.
However... for the rest there is a fairly logical process for conversion which can be implemented and is implemented in some source code converters.
David Anton
http://www.tangiblesoftwaresolutions.com
Convert VB to C#, C++, or Java
Convert C# to VB, C++, or Java
Convert C++ to C#, VB, or Java
Convert Java to C#, C++, or VB
|
|
|
|
|
So, if you strip out the C/C++ libraries and the low level memory manipulation, how much is left? Thinking about my old C++ projects, very little I'd reckon.
|
|
|
|
|
Not necessarily. Some apps have a lot of internal business logic that isn't library intensive and doesn't have any low level memory manipulation. And some library references which do have direct equivalents are used a lot (STL collections, Math, console IO, etc.).
David Anton
http://www.tangiblesoftwaresolutions.com
Convert VB to C#, C++, or Java
Convert C# to VB, C++, or Java
Convert C++ to C#, VB, or Java
Convert Java to C#, C++, or VB
|
|
|
|
|
plzzzzz help
I write the code for importing data from excel
as u suggest me via link given by u
I place a grid view , dbl clk it ,place coding in it
replace datagrid with grid view,n bind it.
It runs but does not show any data.
plzzzz help me
|
|
|
|
|
Hi,
what error you are getting ?
Did u try putting Try Catch ?
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hi,
I have a listening port and it should handle many number of clients at a time.
When i try with 10-25 clients in LAN, its work fine. My doubt is that will it be sucess when it upload to the web, where many number of users acess the server from diffrent part of the world.
Below code is used to listen as server. Please verify the code for multipe number of client, what will be the approximate limit of clients can connect?
strHostName = Dns.GetHostName();
IPHostEntry ipEntry = Dns.GetHostByName( strHostName );
aryLocalAddr = ipEntry.AddressList;
Socket s_listen = new Socket(AddressFamily.InterNetwork,SocketType.Stream, ProtocolType.Tcp);
s_listen.Bind(new IPEndPoint(aryLocalAddr[0], 400));
s_listen.Blocking = true;
s_listen.Listen(-1);
// Setup a callback to be notified of connection requests
s_listen.BeginAccept(new AsyncCallback(app.OnConnectRequest), s_listen);
-----
public void OnConnectRequest( IAsyncResult ar )
{
Socket lis = (Socket)ar.AsyncState;
NewCon( lis.EndAccept( ar ) );
lis.BeginAccept( new AsyncCallback( OnConnectRequest ), lis );
}
thankyou
YPKI
|
|
|
|
|
ypki wrote: My doubt is that will it be sucess when it upload to the web
Do you mean the internet? I'm being pedantic I know, but the web is just port 80 and 443.
ypki wrote: Please verify the code for multipe number of client, what will be the approximate limit of clients can connect?
I can't tell you the limit becuase you also need to take in to consideration the power of the server, what the service will actually be doing and so on. If it can't handle the number of clients, can it be scaled out across multiple servers?
|
|
|
|
|
hi friends ,
is there any free third party grids for editing rows n columns perfectly in FW 3.5. ?
with warm regards
|
|
|
|
|
you should do a google.... you will get plenty of results....
Have a Happy Coding.....
|
|
|
|
|
Denver Thomas wrote: Subject: hi please help me
This is not the way to ask a question in this forum. Please put proper subject line.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
sorry bro. yeah I googled it ...have a gr8 day ahead
|
|
|
|
|
Hi All,
i'm looking to store files from a Folder that get a password to enter,this folder get a password (of course i insert the password ) because its deny access and to be canceled from person without permission so i'm looking how download files from that folder with C# .
Before i tried to download files but Visual Studio got an error: "Access Denied"!
Do you have any advice how download files from a Folder with Password or its impossible???
Thanks a lot
Nice Regards.
EDIT: I forget to post the code snippet how i download files from the folder
private List<string> GetFolder(string Folder)
{
DirectoryInfo dir = new DirectoryInfo(Folder);
FileInfo[] files = dir.GetFiles("*.mp3",SearchOption.AllDirectories);
List<string> str = new List<string>();
foreach (FileInfo file in files)
{
str.Add(file.FullName);
}
return str;
}
private void Form1_Load(object sender, EventArgs e)
{
GetFolder(@"D:\\Music\\")
}
modified on Monday, April 13, 2009 2:55 AM
|
|
|
|
|
I have a rich text box in a form. I need to cut a review found on a web site and paste it to the rtb. I can do this without a problem. BUT, how do I change the font of the paste to match the font used on the form?
I have spent several hours trying to do this and have tried to find suggestions/answers on the web. NO LUCK. So I am turning to the experts.
Thanks,
TH
|
|
|
|
|
This may help you....
Font newFont = new Font(text, Size, FontStyle);
richTextBox1.SelectionFont = newFont;
call this after you paste data in the RTB.......
Have a Happy Coding.....
|
|
|
|
|
Hello sir,
I am using Treelistview C# component in my project,
It is almost finish except (cell)label edit on key press.
Below is brief of my code, I can not send code outside from my office otherwise I could have sent you same code, which I had written.
I wanted to call “begin edit” event, when keyboard key press like ‘F2’
I have tried to update override function call wndproc() of project TreeListview2002.dll
In the region key-Down “BeginEdit ”,
Checking key code is “F2” then
Wrote same thing which is already there in “Beginlabeledit region under notify region.
Get edit handle can call the same wndproc(reff mess)
But it want work, can you help me to complete this Project.
Thanks
hiren shah
|
|
|
|
|
Hello sir,
I am using Treelistview C# component in my project,
It is almost finish except (cell)label edit on key press.
Below is brief of my code, I can not send code outside from my office otherwise I could have sent you same code, which I had written.
I wanted to call “begin edit” event, when keyboard key press like ‘F2’
I have tried to update override function call wndproc() of project TreeListview2002.dll
In the region key-Down “BeginEdit ”,
Checking key code is “F2” then
Wrote same thing which is already there in “Beginlabeledit region under notify region.
Get edit handle can call the same wndproc(reff mess)
But it want work, can you help me to complete this.
Thanks
hiren shah
|
|
|
|
|
Dear All, I am using FtpWebRequest to upload my data to ftp address, i am successful in uploading my data, but what bothers me is whenever my upload fails even at last byte of data, it again starts from zero i mean from beginning.
i am looking to find out about how to provide resume feature for uploading data?
What an idea is behind resume feature? do we have standard algorithm for that?
i have dedicated server.
|
|
|
|
|
Dear All
I am Beginner the problem is that i am designing an application when i am running the application the task bar is hidden while the application is active how shall i want the application just like word or excel that when running the task bar is not hidden
Regards
Sajid Salim khan
|
|
|
|
|
I didn't get your point? Do you want to hide the application from Task Bar or what?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
A better explanation of your question will be much appreciable....
Have a Happy Coding.....
|
|
|
|
|
Hi,
How many thread can i use in a page?
eg:
i have 10-15 for loop to execute at a time. Can i able that much of thered?
What is the limit of thread in a page?
Thankyou
YPKI
|
|
|
|
|
You can use unlimited Thread in your application. It depends on what is your system configuration because
Thread takes Memory and CPU Usage.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
The optimum thread count you should use depends on your process, it's design, but more importantly the CPU and hardware you have. Launching a thread allocates a minimum of 1MB of memory, so for your 10 to 15 threads, you just commited 10 to 15MB of RAM to your app as well. AND, on a dual core system, only 2 of those threads would be running, at most, at any point in time. Threads only give the illusion of code running faster. In the majority of cases, they don't actually make a process run faster. Keep the threads you need to a minimum.
|
|
|
|
|
hello
QUESTION 1: is it true that .NET framework will automatically enlist help from Distributed Transaction Coordinator?
<br />
try {<br />
IDbConnection oConn1 = new SqlConnection("Data Source=Server1;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;");<br />
<br />
<br />
IDbConnection oConn2 = new SqlConnection("Data Source=Server2;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;");<br />
<br />
IDbTransaction oTx1 = oConn1.BeginTransaction();<br />
IDbTransaction oTx2 = oConn2.BeginTransaction();<br />
<br />
<br />
... oConn1 db access ...<br />
... oConn2 db access ...<br />
<br />
oTx2.Commit();<br />
oTx1.Commit();<br />
} catch(Exception ex)<br />
{<br />
oTx2.Rollback();<br />
oTx1.Rollback();<br />
} finally {<br />
...<br />
}<br />
QUESTION 2: There's no "TransactionScopeOption" for IDbTransaction.BeginTransaction?! It's always TransactionScopeOption.New?
QUESTION 3. How can you join transaction without use of TransactionScope? Is there such thing as joining multiple transaction..?
<br />
IDbTransaction oTx = oConn1.BeginTransaction();<br />
oConn2.EnlistTransaction(oTx);<br />
<br />
oTx.Commit();
Thanks
dev
modified on Sunday, April 12, 2009 10:03 PM
|
|
|
|