What is the raise event used for?
Answers were Sorted based on User's Feedback
The RaiseEvent statement raises an event previously declared
with the "Event" statement. Since only classes can raise
events, usage of this keyword is reserved for class modules,
forms and user controls.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / dhananjay yadav
Raise Event is used for raising events. ex raising control
event from main page .
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / vini778
It is used for raising the error from sql statement
Eg shown below
IF @@TRANCOUNT>0 ROLLBACK TRANSACTION
Raise an error with the details of the
exception
DECLARE @ErrorMessage NVARCHAR
(
MAX
)
DECLARE @ErrorSeverity INT;
DECLARE
@ErrorState INT;
SELECT
@ErrorMessage=ERROR_MESSAGE
(
)
,
@ErrorSeverity=ERROR_SEVERITY
(
)
,
@ErrorState=ERROR_STATE
(
)
;
-- Use RAISERROR inside the CATCH
block to return error
-- information about the original
error that caused
-- execution to jump to the CATCH
block.
RAISERROR
(
@ErrorMessage,-- Message
text.
@ErrorSeverity,--
Severity.
@ErrorState -- State.
)
;
| Is This Answer Correct ? | 1 Yes | 4 No |
What is a strategy pattern? Implement it.
Explain what is a delegate?
Why do we use msmq?
Explain Creational design pattern in .NET?
How to load the contents of an xml file into an xmldocument object?
In code behind class, name the type of code found. Is it the server side code or client side code?
what is prototype design pattern in .net
Explain the difference between task and thread in .net?
Sql Queries: A Table will be given Omiting Duplicate rows and adding a new column
What is the procedure to add assemly to gac to make it shared one?
Explain the top .net class that everything is derived from?
What is the difference between an abstract class and an interface?