Skip to content

Instantly share code, notes, and snippets.

//++ 合并两个pb结构++//
public static void mergeFromPb(object oldObj, object newObj, List<string> ignore_list = null){
if(oldObj.Equals(newObj))
return;
Type oldType = oldObj.GetType();
Type newType = newObj.GetType();
// if(oldType.Equals(newType) == false){
// return;
// }
PropertyInfo[] newInfos = newType.GetProperties();
@roowe
roowe / gist:2848998
Created June 1, 2012 05:08 — forked from zythum/gist:2848881
google收录的敏感词