블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2794)
Unity3D (852)
Programming (478)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (11)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

C# 레퍼런스 모음.

C/C++ 을 하다가 C# 으로 추가 개발을 하려는 사람에게 꼭 필요한 것들을 모아봤음.
직접 해보면서 삽질한 내용임.

C# eBook
http://www.bestsoftware4download.com/software/t-free-c-school-ebook-download-llijghlw.html
http://www.pnasoft.com/archive/2008/01/11/pro-csharp-2008-and-the-net-3-5-platform-4th-edition.aspx

C++ / CLI, Managed C++ eBook
http://int6.net/ebook/Expert.Cpp.Cli.NET.pdf

C# memcpy (링크를 까먹어서 -_- 코드로 대체)


// copied from group.google.com 
public object raw_deserialize_ex(byte[] rawdatas, Type anytype) 
{ 
 int rawsize = Marshal.SizeOf(anytype); 
 if (rawsize > rawdatas.Length) 
   return null; 
 GCHandle handle = GCHandle.Alloc(rawdatas, GCHandleType.Pinned); 
 IntPtr buffer = handle.AddrOfPinnedObject(); 
 object retobj = Marshal.PtrToStructure(buffer, anytype); 
 handle.Free(); 
 return retobj; 
} 
 
// copied from group.google.com 
public byte[] raw_serialize_ex(object anything) 
{ 
 int rawsize = Marshal.SizeOf(anything); 
 byte[] rawdatas = new byte[rawsize]; 
 GCHandle handle = GCHandle.Alloc(rawdatas, GCHandleType.Pinned); 
 IntPtr buffer = handle.AddrOfPinnedObject(); 
 Marshal.StructureToPtr(anything, buffer, false); 
 handle.Free(); 
 return rawdatas; 
}


Block Copy
http://msdn.microsoft.com/en-us/library/system.buffer.blockcopy.aspx

Byte[] to String
System.Text.Encoding.UTF8.GetString(...);

String to Byte[]
ASCIIEncoding.UTF8.GetBytes(...);

[Managed C++] System::String^ <-> std::string
http://www.codeguru.com/forum/showthread.php?p=1722705#post1722705

UI Invoke (다른 Thread 에서 ui 를 업데이트 하려면 invoke 를 거쳐가야함.)
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.invoke.aspx
i.e.) this.Invoke(new _set_btn_enable_delegate(_set_btn_enable));

Property Grid
http://msdn.microsoft.com/en-us/library/aa302326.aspx

XML Serializer
http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx

CRC32, MD5, SHA1
http://www.vbaccelerator.com/home/net/code/Libraries/CRC32/article.asp
http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1cryptoserviceprovider.aspx

Native C++ <-> Unmanaged C++ <-> C#
http://sj21.wo.to/tt/483
http://sj21.wo.to/tt/484
http://blogs.msdn.com/junfeng/archive/2006/05/20/599434.aspx

Application 정보는 System.Application
Environment 정보는 System.Environment

다른 Application 실행시키려면
http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.aspx


일단 이정도.

위의 내용만 잘 숙지해도, 기본적인 개발은 할 수 있음.


출처 : http://eeodl.blogspot.com/2008/11/c-managed-c.html

반응형

'Programming > C++/CLI' 카테고리의 다른 글

C++/CLI Type  (2) 2010.09.13
Win32 API TYPE <-> C# TYPE  (0) 2010.07.20
C++/CLI 빌드 시, LNK2019 에러 #3  (0) 2010.06.07
C++/CLI 빌드 시, LNK2019 에러 #2  (0) 2010.06.07
C++/CLI 빌드 시, LNK2019 에러 #1  (0) 2010.06.07
Posted by blueasa
, |