... thông tin bảo mật … Assembly tập hợp tập tin mà theo cách nhìn lập trình viên thư viện liên kết động (DLL) hay tập tin thực thi (EXE) Trong NET assembly đon vị việc tái sử dụng, xác định phiên bản, ... đòi hỏi tách rời tập tin tiêu đề với tập tin cài đặt C++ Hơn thế, C# hỗ trợ kiểu sưu liệu mới, cho phép sưu liệu trực tiếp tập tin mã nguồn Đến biên dịch tạo tập tin sưu liệu theo định dạng XML ... public Time(Time existingTimeObject) { Year = existingTimeObject.Year; Month = existingTimeObject.Month; Date = existingTimeObject.Date; Hour = existingTimeObject.Hour; Minute = existingTimeObject.Minute;...
Ngày tải lên: 10/08/2014, 06:20
Lập trình .Net và .Com
... dụng trỏ làm việc với COM, WinAPI, hàm DLL Các toán tử sử dụng với trỏ tương tự C/C++ &: toán tử lấy địa *: toán tử lấy nội dung trỏ ->: toán tử đến thành viên trỏ Ví dụ sử dụng trỏ làm tham ... copied to newTest", file.FullName); } filesInDir = newSubDir.GetFiles( ); // xóa vài tập tin // đổi tên vài tập tin int counter = 0; foreach (FileInfo file in filesInDir) { string fullName = file.FullName; ... int* nBytesRead, int overlapped); // hàm dựng: mở tập tin tồn public APIFileReader(string filename) { fileHandle = CreateFile( filename, // tập tin GenericRead, // cách truy xuất - desiredAccess...
Ngày tải lên: 30/09/2013, 02:20
... dùng cho truy nhập thao tác với sở liệu System.Drawing: Chứa lớp làm việc với đồi hoạc System.IO: Chứa lớp làm việc với tệp thư mục 2007 Bộ môn Các Hệ thống Thông tin Slide 21 Một số khái niệm ... không gian tên NET System.Windows.Forms: Chứa lớp làm việc với giao diện đồ hoạ System.Xml: Chứa lớp xử lý liệu XML 2007 Bộ môn Các Hệ thống Thông tin Slide 22 Một số khái niệm Hoàng Hữu Việt Cấu ... Bộ môn Các Hệ thống Thông tin Slide Môi trường lập trình NET Hoàng Hữu Việt Một số khái niệm C# NET Project Tập hợp tệp, hình ảnh, tài liệu Project C# NET solution Tập hợp Project tạo nhiều ứng...
Ngày tải lên: 16/04/2014, 14:21
Câu hỏi và trả lời trong lập trình .NET
... Directory c) Dir [“S”]=”SMITH”; [“M”]=”MARTIN”; Dir [“M”]=”MARTIN”; b) Directory [“SMITH”]=”S”; Directory d) Dir [“SMITH”]; Dir [“MARTIN”]=”M”; [“MARTIN”]; Which of the following are true with ... does not allow module creating of assembly in memory dynamically b) Windows 2000 operating System is d The Reflection API capable of loading two assemblies ) allows creating with the same name ... object myObject = System.Reflectrion CreatInstance(myObjectType) myObjectType =Type.GetTypeFro mProgID ("MyDll.MyOName" ) object myObject = System.Activator.C reatInstance (myObjectType) d) In C#,...
Ngày tải lên: 04/09/2012, 14:58
Lập trình .net 4.0 và visual studio 2010 part 1 docx
... Shift Due to various physical limitations, CPU manufacturers are now concentrating on releasing multicore processors Writing programs to run in parallel is difficult, but fear not: VS2010 and NET ... and debugging facilities, both of which will be covered in Chapter Unit Testing and Test-Driven Development Unit testing and test-driven development are becoming increasingly popular in software ... OK, ASP.NET MVC isn’t NET 4.0, but again it is an important interim release Cloud Computing Cloud computing must win the buzzword of the year award for 2009 It is becoming an increasingly popular...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 2 ppsx
... options available in VS2010 for generating classes and method stubs 18 You now you have the choice of creating a Zebra class in a separate file (Zebra.cs) by selecting “Generate class” or you can ... drop-down menu that allows you to select the version of the framework that you are targeting when creating an application (see Figure 2-2) When you make a selection, Visual Studio will filter ... Code-optimized profile can be selected when you first load Visual Studio or by selecting Tools Import and Export Settings 12 CHAPTER VISUAL STUDIO IDE AND MEF Figure 2-4 VS2010 contains environmental...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 3 pptx
... extend it by creating their own shapes of bricks MEF enables you to this by defining a brick interface and then dynamically loading and resolving the created extensions When creating a MEF application, ... purpose is, however, creating extensible applications through discovery and composition, whereas IOC containers are generally more focused on providing an abstraction for testing purposes It’s not ... then load them both into an IEnumerable variable called Message before iterating through them and printing out the messages Create a new console project and call it Chapter2.HelloMEF Add...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 4 doc
... Gallery option Figure 2-17 Extension Gallery WHAT ABOUT EXISTING EXTENSIONS CREATED WITH PREVIOUS API? Microsoft say that 80%+ of existing IDE customization will be supported through the use of ... checking, intellisense, and so on (although the scroll bars behave a little strangely) Distributing Extensions So you have just created your very useful rotate text editor extension and want ... these shims in the next version of Visual Studio after VS2010 Visual Studio Shell It is worth noting that from VS2008 Microsoft opened up the ability to make use of the IDE for your own applications...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 5 ppsx
... well Line Continuation One of the aspects of VB.NET I really hated was the line continuation character (an underscore with a space before it) This particularly annoyed me when writing LINQ queries, ... numbers Select n Where n>5 You can of course continue to use the line continuation character in your code so you will not have to any modifications to existing projects You may also need to use it ... compiler cannot infer where a line break exists Inferred Line Continuation Rules According to Microsoft, the inferred line continuation works in the following situations: • After an attribute...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 6 pdf
... elephants are mean So, What’s the Problem? Well, some folk found that NET would stop them from writing code and modeling situations that are safe For example, the following did not work prior to ... will create a new class called WeightComparer that will implement the IComparer interface; implementing the IComparer interface will then enable us to use the Sort() method on the list object Create ... 0; return -1; } } ICOMPARER IComparer accepts two parameters and will return an integer representing whether one object is greater, equal, or less than the other In our example: if x.weight equals...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 7 pps
... compile time These features can also make it possible to perform some interesting code tricks and reduce tedious casting operations if the language can work out how to use the type Some developers ... help them develop and prototype applications much quicker, and can be particularly suitable for testing and prototyping applications The main disadvantage of working with dynamic languages is they ... DYNAMIC CHANGES Why Type Variables as Dynamic? One advantage is that it can avoid some tedious casting and Reflection code For example, let’s say we want to create an instance of a type using a...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 8 doc
... 2.6) 59 CHAPTER LANGUAGE AND DYNAMIC CHANGES using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using IronPython.Hosting; namespace Chapter3.PythonExample { class Program { static void ... http://ironpython.codeplex.com/ Now add a reference to IronPython.dll and Microsoft.Scripting.dll (at the time of writing these don’t show up on the main Add Reference window but are located at C:\Program ... create an intermediary AST, but IronPython’s developers decided this would be a useful step for creating language-specific tools.) The IronPython AST is then mapped to the generic DLR specific AST...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 9 pps
... IronPython is for embedding in applications Potential uses include user scripting, adding a live console for debugging, creating domain-specific languages (DSLs) where rules can be added or modified ... They’re great, particularly for interoperating between C# and DLR-based languages The dynamic features make this much easier The dynamic keyword also makes creating fluent APIs possible (like the way ... Easy introspection (reflection without the pain) • Problems like covariance, contravariance and casting just disappear The best way to learn how to get the best from IronPython is my book IronPython...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 10 ppt
... will affect your existing NET applications running on previous versions of the framework ASP.NET When using IIS7, the CLR version is determined by the application pool settings Thus you should ... Thus you should be able to run NET 4.0 ASP.NET applications side by side without fear of affecting existing ASP.NET sites What Version of the CLR Does My Application Use? It depends; applications ... version="v1.0.3705" /> The version property supports the following settings: • v4.0 (framework version 4.0) • v2.0.50727 (framework version 3.5) • v2.0.50727 (framework...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 11 potx
... formats, and number formatting • Miscellaneous updates to globalization properties such as currency, date and time formats, and number formatting TimeSpan Globalized Formatting and Parsing TimeSpan ... ParseExact()(), and TryParseExact()() to support cultural sensitive formatting Previously, TimeSpan’s ToString() method would ignore cultural settings on an Arabic machine, for example 73 CHAPTER CLR AND BCL ... of specific types of evidence rather than iterating through the collection NOTE Thanks to Shawn Farakas of the Microsoft security team for assisting me with this section Monitoring and Profiling...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 12 ppt
... Mathematicians will be glad of the addition of the new Complex type: a structure for representing and manipulating complex numbers, meaning that they will no longer have to utilize open source libraries ... although this is only currently accessible through F# Changes to Existing Functionality NET 4.0 enhances a number of existing commonly used methods and classes Action and Func Delegates Action ... tedious coding: MemoryStream destinationStream = new MemoryStream(); using (FileStream sourceStream = File.Open(@"c:\temp.txt", FileMode.Open)) { sourceStream.CopyTo(destinationStream); } Guid.TryParse(),...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 13 docx
... v6) by setting the IPv6Only option to false when creating the socket HttpWebRequest HttpWebRequest has had two new properties added: • Date for setting HTTP date header • Host for setting HTTP ... Environment.Is64BitProcess and Environment.Is64BitOperatingSystem 64-bit is becoming mainstream now, so new methods have been added to return a Boolean value, indicating whether your application or process ... making a call to Dns.GetHostAddresses()() resulting in reduced and clearer code: var socket = new System.Net.Sockets.Socket(new System.Net.Sockets.SocketInformation()); socket.Connect(new DnsEndPoint("www.microsoft.com",...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 14 docx
... decorating a procedure with the [ContractInvariantMethod] attribute The following code ensures that the ImportantData variable can never be null: 93 CHAPTER CLR AND BCL CHANGES [ContractInvariantMethod] ... the compiler to treat code as a precondition and allows you to utilize legacy code without converting it to code contracts format: if (Input==null) throw new System.NullReferenceException("input ... compile time You might ask why static verification is not always on? One reason is that if you are writing unit tests, you might want to pass null values into your methods and ensure that your code...
Ngày tải lên: 01/07/2014, 21:20
Lập trình .net 4.0 và visual studio 2010 part 15 pps
... approach First, creating a thread is a resource-intensive process, so (depending on the type of work you do) it might be not be the most efficient and quickest way to complete a task Creating too many ... can impose a limit on the number of threads created preventing thread starvation issues However the thread pool isn’t so great at letting you know when work has been completed or cancelling running ... http://en.wikipedia.org/wiki/Race_condition • Deadlocks: "A deadlock is a situation in which two or more competing actions are waiting for the other to finish, and thus neither ever does It is often seen in a paradox...
Ngày tải lên: 01/07/2014, 21:20