May 29, 2011

Nullable String

Error:
The type 'string' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable'

Problem:
- I have a function that I want to pass data that gets data from ...
- What's C# problme with nullable string ...
- Why no support for nullable string in C#
- C# have a problem with passing nullable string ...
- public void test(string? x){} has ERROR
- public void test(Nullable x){} has ERROR

Solution:
:-D System.String is a reference type and it is nullable. :-)

May 27, 2011

History of Adobe Media Player

Problem:
- How do i delete all my personal videos in Adobe Media player?
- Where is file history in Adobe Media Player?
- How to clear history of Adobe Flash Player?

Solution:
It's so simple. Go to below folder and delete or rename it ... ;-)
C:\Users\{YOUR USER}\AppData\Roaming\Adobe\Adobe Media Player
like
C:\Users\Administrator\AppData\Roaming\Adobe\Adobe Media Player

May 25, 2011

Modifying a 'method' which contains a query expression will prevent

Error:
Modifying a 'method' which contains a query expression will prevent the debug session from continuing while Edit and Continue is enabled.

Solution:
If did you add a LINQ code then you have no solution.
I'm serious and you can find the answer of microsoft out here

May 10, 2011

String was not recognized as a valid DateTime

Error:
The message of exception is "String was not recognized as a valid DateTime."

Problem:
- I am trying to convert my string formated value to date type with DateTime.ParseExact but ...
- I get the error saying "String was not recognized as a valid DateTime" when I used of ParseExact ...
- ... in some value as "9/7/2008 13:00:00" when im going to set startdate it throw was not recognized as a valid DateTime and ...

Solution:
The DateTime.ParseExact have not any problem and the orginal problem comes from us thus you attention to String of Formatx
EXAMPLE: the string format for "02/Dec/2007:14:15:40 -08:00" is
WRONG: dd/MMM/yyyy:hh:mm:ss zzz
RIGHT: dd/MMM/yyyy:HH:mm:ss zzz

Did you got the problem source! It comes from (hh) and because the hour is greater than 12 need the (HH). Ok, look at again to the StringFormat and debug it again ;-)