Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public static class StringExtensions {
- public static void PrintWithDate (this string s) {
- Debug.Log (s + System.DateTime.Now.ToString ());
- }
- }
- public class StringDateCaller : MonoBehaviour {
- string myString = "Now its ";
- void Start () {
- //This will print the string whit the actual date and time
- myString.PrintWithDate ();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement