Category:Freshman

  • . net advanced level 02 delegate delegate, event event

    Time:2019-12-15

    Knowledge can form skills only after being sorted out Content directory I. overviewII. Analysis of entrusted knowledge points1. Nature of entrustment2. Use of entrustment3. Significance of entrustmentLogic decouple, reduce repetitive codeCode encapsulation, support extensionAnonymous methods and lambda expressionsAsynchronous multithreadingMulticast delegationThree, eventsFour, summary I. overview Let’s start with the entrustment, which we often use. It’s necessary […]

  • . net core uses httpclient to send proxy requests. Net core uses httpclient to grab packets in programs. Net core uses httpclient to grab packets in fiddlers

    Time:2019-12-14

    Through Fiddler to grab the browser request data, I’m sure everyone can use it. We know that Fiddler is to grab the packet data by adding a default proxy server to the local calculator, and the port number is 8888. In fact, when we open Fiddler’s settings, we can see:     Then view the […]

  • .NET Foundation

    Time:2019-12-13

    .NET frameworkIt is a CRL oriented programming platform running on system virtual machine and based on CLR.. net’s BCL runs on top of the CLR.The. Net framework is open source.. net supports multi language development, including C ා, f ා, vb.net, etc.A program written in. Net language generates an assembly after compilation. At runtime, the […]

  • Differences among hashtable, dictionary and concurrentdictionary

    Time:2019-12-12

    Reprinted from https://blog.csdn.net/yinghualsx/article/details/72952857 1、HashTable Hashtable represents a collection of key / value pairs. In the. Net framework, hashtable is a container provided by the system.collections namespace. It is used to process and represent key value pairs similar to key value, where key is usually used for quick search, and key is case sensitive; value is […]

  • Custom factory class

    Time:2019-12-11

    using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; namespace LYZB.ApiConfig { /// ///Custom factory class /// // generic public abstract class AssesUtil where T : class,new() { /// ///Cache collection /// private static Hashtable hash = Hashtable.Synchronized(new Hashtable()); /// ///Execution instance method /// ///Method name ///Parameter type ///Parameter entity /// public […]

  • Web API records the type of server address obtained by deploying IIS

    Time:2019-12-10

    There are many types of server address. The following records are available 1、HttpContext.Current.Server.MapPath(“~/File”) The returned value is D: \ 3project \ code \ mobileservice \ webapi \ file. Local service: this path is the root directory of the disk address where the project is located. Deployment server: the disk folder where the deployment file is […]

  • Nuget problems, solved

    Time:2019-12-9

    When you enter install package mysql.data in the package management console of VS, the latest version 8.0.18 is installed by default,However, after the installation, it was found that the package was not added to the reference list of the project,Find the corresponding folder mysql.data.8.0.18 in the packages folder of the solution, and find that there […]

  • C ා entrusted supplement 01

    Time:2019-12-7

    In the last article, we wrote some basic things about entrustment. In this article, we talked about other things about entrustment. Example 1 plug in programming According to the understanding of delegates, delegates can pass a method as a parameter. With this feature, we can use delegates to implement plug-in programming. public delegate int Transformer(int […]

  • Conversion between bitmap and bitmapimage in WPF (c)

    Time:2019-12-6

    I. set ImageSource in image control of WPF image1.Source = new BitmapImage(new Uri(@”image file path”, Urikind.RelativeOrAbsolute)); You can also use: System.IO.FileStream fs = new System.IO.FileStream(filepath, System.IO.FileMode.Open, System.IO.FileAccess.Read); byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length); fs.Close(); fs.Dispose(); System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer); BitmapImage bitmapImage = new BitmapImage(); bitmapImage.BeginInit(); bitmapImage.StreamSource = ms; bitmapImage.CacheOption = BitmapCacheOption.OnLoad; bitmapImage.EndInit(); […]

  • The simplest ArcGIS Engine Application (I)

    Time:2019-12-5

      Noun: Iworkspacefactory workspace factory Shapefileworksapcefactory vector file workspace factory Iworkspce workspace Ifeatrueworkspace feature workspace Ifeatureclass feature class Ifeaturelayer feature layer Featurelayerclass feature layer class Ilayer layer objects IMAP map object   Load the specified SHP file (code analysis) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; […]

  • Covariant and contravariant

    Time:2019-12-4

    Forward: https://www.cnblogs.com/ninputer/archive/2008/11/22/generic_covariant.html Background: covariance and contraversion   Suppose there are two types: Tsub is a subclass of tParent. Obviously, Tsub type references can be safely converted to tParent type references. If a generic interface ifoo,IFooCan be converted to ifooIn other words, we call this process covariant, and say that this generic interface supports covariance for t. […]

  • C-covariance and inversion

    Time:2019-12-3

    Microsoft official overview: In C, covariance and inversion can realize implicit reference conversion of array type, delegate type and generic type parameters. Covariant preserves allocation compatibility, while contravariant preserves allocation compatibility. Covariance: the ability to use a more derived type than the originally specified derived type. Contravariant: able to use less derived types. Official example: […]