# Event usage in a class member function

**URL:** <https://verificationacademy.com/forums/t/event-usage-in-a-class-member-function/32141>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, Learning-System-Verilog\
**Created:** [August 11, 2016, 3:00am UTC](https://verificationacademy.com/forums/t/event-usage-in-a-class-member-function/32141 "2016-08-11T03:00:14Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![alexgran](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/ce73a5/32.png) [@alexgran](https://verificationacademy.com/forums/u/alexgran)\
**Post date:** [August 11, 2016, 3:45am UTC](https://verificationacademy.com/forums/t/event-usage-in-a-class-member-function/32141/3 "2016-08-11T03:45:09Z")

</div>

_In reply to [bharath123](https://verificationacademy.com/forums/t/event-usage-in-a-class-member-function/32141/2):_

It is always helpful to include the exact error message or symptom you are seeing so we know exactly you’re having trouble with.

As Srini mentions line 13 of your code

```verilog
task my_new@(ev1);

```

is not valid syntax as it currently exists

You also don’t ever appear to call the task ‘my\_new’ that I see.

---

_[View the full topic](https://verificationacademy.com/forums/t/event-usage-in-a-class-member-function/32141)._
