how to destroy an object in unity

Code Example - how to destroy an object in unity

                
                        Destroy(gameObject);
                    
                
 

destroy gameobject unity

                        
                                Destroy(this.gameObject);
                            
                        
 

how to destroy a gameobject in csharp

                        
                                Destroy(gameObject); // destroys the game object attached to the script