Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static string AcceptNotNullObject(object! s)
- {
- return s.ToString();
- }
- MyResource resource;
- try
- {
- resource = new MyResource();
- //
- // Do some work
- //
- }
- finally
- {
- if (resource != null)
- resource.Close();
- }
- let counter = ref 0;;
- let next_counter_value () = (counter := !counter + 1; !counter);;
- type distributed_computation_result = NotYetAvailable | Result of float;;
- let print_result r = match r with
- | Result(f) -> Printf.printf "result is %fn" f
- | NotYetAvailable -> Printf.printf "result not yet availablen";;
- class A {
- B fieldb;
- }
- class B {
- A fielda;
- }
- A a = new A() // a.fieldb is null
- B b = new B() { fielda = a } // b.fielda isnt
- a.fieldb = b // now it isnt null anymore
Add Comment
Please, Sign In to add comment