Evaluation of the effort: using C / Win32 or learning C # /. NET

I intend to write a small application to scratch my personal itch and possibly make life easier for some colleagues. Here is what I have:

  • Over 10 years experience in C
  • A lot of experience in programming against the Win16 / 32 API in C from Win3.1 to 2000 days.
  • The C library I wrote already does about 75% of what the application should do.

What the application should do:

  • open the binary file, transfer it to the specified library.
  • take the resulting text and load it into a new Excel workbook.
  • apply some formations.
  • go well with the Windows environment (presence in "Open With ...", remember some things, using the registry, etc.)
  • (maybe later) before transferring the CSV data to Excel, analyze it by looking at the meaning of some values ​​in the XML file.

With the exception of the XML parsing part, I did all this before including COM / Office Automation in C / Win32. There is a lot of template code, but this is doable, and the result will be a fairly small application without the need for installation.

So why even think about C # /. Net?

  • No XML parsing experience
  • the promise of less conditional code for Windows and Excel files (yes, I made C ++ with OWL, MFC, ATL, etc., but I don’t go there anymore - not for free / fun)
  • Since I also have experience with C ++, VB (not .Net) and a bit of Java / Objective-C, I think that learning C # will be related to .Net libraries, not the language.

My thoughts so far:

  • .NET / .
  • , , ( XML-).
  • VB , 80%, DLL C. , , .Net.

- . . XML .

, .

: , . Win32 , EXE < 1Mb, . .Net . MSI - Visual Studio Express () ?

+3
8

, :

  • .NET / .

. , . , , . , .Net, C. , . , C, . API , .

  • , , ( XML-).

, .: -)

  • VB , 80%, DLL C. , , .Net. - . . XML .

.Net - VB. , VB , , , .Net. , Windows .Net. , , API .Net. -,.Net Remoting, MSMQ WCF. .Net, VB. , # , .

- C, . COM- interop .Net. DLL , DllImport. www.pinvoke.net .

VB, ++, , VB. .Net, , ++, , COM-, , interop. , .

+4

COM, # 4.0 - , -. COM- .

, C XML. , . , , , , .

?

+3

# .NET.

, , , , # .NET, , .

, . , , C win32 .

, .

+2

.:-) , - . , . , xml COM.

, , C, #. , , C.

# .Net..Net XML COM- , # ( !). , # .Net, .

.Net , , # ( ). .Net, , , , , , . , #, !

: , .Net. , , , , , . 1 Mb .Net, .

+1

, #. . ( ), , , C/Win32. , C- [DllImport].

+1

..NET xcopy-, exe. ( .NET framework )

+1

, ++/CLI #. ++/CLI .

, visual studio. clickonce ( ) WIX ( MSI XML).

+1

# .Net,

No, you need to learn a lot about the language (delegates, events, generics ...), and it is also object-oriented, and it manages memory by itself and yes there are no pointers :)

anyway, C # and .NET - all you need is some effort to speed up.

+1
source

Source: https://habr.com/ru/post/1711165/


All Articles