Skip to content

Instantly share code, notes, and snippets.

@scriptnull
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save scriptnull/eb5683435881a4aa0e02 to your computer and use it in GitHub Desktop.

Select an option

Save scriptnull/eb5683435881a4aa0e02 to your computer and use it in GitHub Desktop.
This is a snippet that supplements http://scriptnull.github.io/foreachline/#/ . usage: public int apple ; or public int apple { get; set;} ; gets converted into oldObject.apple = newObject.apple;
if(line.indexOf('[') > 0 || line == ''){
line = "";
}else{
line = line.trimLeft().split(' ')[2];
line = "oldBook." + line + " = " + "book." + line;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment