Skip to content

Instantly share code, notes, and snippets.

@wzj1695224
wzj1695224 / XmlSerialize.cs
Created March 5, 2019 02:37
XML Serialize
using System.Collections.Generic;
namespace ConsoleAppTest
{
using System;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
public class IdaConfigInfo
@wzj1695224
wzj1695224 / AppConfig_CustiomSection.cs
Created March 5, 2019 02:02
Using App.config custom section
public class IdaConfigInfo : ConfigurationSection
{
public string sdkver => SectionInformation.SectionName;
[ConfigurationProperty("idadir", IsRequired = true)]
public string idadir
{
get => (string)base["idadir"];
set => base["idadir"] = value;
}
@wzj1695224
wzj1695224 / using IFS.sh
Last active September 5, 2017 12:06
[tr] examples of tr #StringFormat
#!/usr/bin/env bash
IN="haha\nhaha\n====\nhehe\nhehe"
OIFS=$IFS
IFS="===="
i=1
segs=$IN
for seg in $segs