When using the Agent Smith plugin for ReSharper, I get the warning "Enums that are not flags should not have plural names" for an enum that ends in Status. For example:
public enum SomeStatus
{
Success,
Failed
}
In fact Status is not plural, so this isn't really in violation of the naming rule. I found this ticket from 2008 br...
This question is similar, but my question seems to get asked in an unanswered comment.
I create a C# class. I use alt-insert to add a constructor. I add an argument to the constructor, and then I use alt-enter to create and initialize a field from that argument, like so:
The problem is that my field gets created as a readonly field...
I am trying to get the output of a stored procedure into a function but with my code i am always getting a error telling that the output parameter is not specified.Can u help?
the code is here.....
public int UserAuthentication(String username, String password)
{
SqlConnection conn = new SqlConnection("Data Source=CLEMATIS-11\\CLEM...
I'm trying to find the right thing to do with a non-null validation on a nullable boolean. I also want to be able to do the same thing with some other fields, including strings, ints, etc., so I want to use generics for the method. Here's an example of the kind of thing which can happen.
bool? myValue = null;
bool valid = ValidateNotNul...
During my trial of ReSharper 5, I noticed its version of IntelliSense falls behind Visual Studio 2010's in three ways that were key to me:
ReSharper doesn't support IntelliSense in the "QuickWatch..." debugger utility.
ReSharper's IntelliSense seems to break down for me in .aspx files between the <%= %> tags.
I couldn't find a way to g...
Hi, is there any plugin for Resharper or VS extensions for auto sorting class/struct members as suggested by StyleCop? I.e. something which sorts public, protected, then private properties, then public, protected, private methods?
...
Can I configure ReSharper to fix C# code when curly braces are not used to surround a single-line code block, like this:
if (blnSomeCondition)
DoSomething(); // complain
if (blnSomeOtherCondition)
{
DoSomethingElse(); // don't complain
}
Thanks
...
Has anyone got a strategy for unit testing heiarchies in Resharper?
I typically use both TestDriven.Net and Resharper's test runner, with NUnit tests. TestDriven is awesome for everything but quickly finding a bad test out of a batch run (which could be thousands), which is where Resharper's runner comes in.
I typically use a pattern ...
I can't seem to find a way to insert the method return type in a Resharper 5 macro. Can this be done?
For example, I have the following template:
Contract.Ensure(Contract.Result<$RESULTTYPE$>() != null);
I would like $REUSLTTYPE$ to be automatically filled with the data type of the current method, but I can't find a macro that woul...
There are some XML files in the project I'm working on that are included in the project files, but that don't exist (they weren't created by NAnt for some reason). The project is working fine, but ReSharper reports each of the missing files as an error. I know I can ignore ordinary errors, but with these, clicking on the + symbol in “Err...
I know that there is a way to do this, but I can't find it again.
So, does any one know how to allow Resharper to allow underscores in unit tests?
So, for example I want this to be OK
In MyClassTest.cs
public void MyMethodName_StateUnderTest_ExpectedResult()
{}
But I want this to flag:
In MyClass.cs
public void MyPoorly_Nam...
Does anyone know how to make Resharper add blank lines after brackets when performing code cleanup?
I want to make the following code
if (x == y)
{
int a = x;
int b = y;
int z = a + b;
}
Look like this
if (x == y)
{
int a = x;
int b = y;
int z = a + b;
}
...
Is it possible to make resharper include linked files when refactoring?
Consider a solution setup with the following projects:
Backend
Services //Depends on 'Backend' and 'Services.Shared'
Services.Shared
Services.Shared.Silverlight //This project links all sourcecode in 'Services.Shared'
Frontend //Depends on 'Services.Shared' through...
Usually when the page_load event handler is added to a codebehind file by Visual Studio (e.g. double clicking the page in designer mode), it ends up looking like this:
/// <summary>
/// Handles the Load event of the Page control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="...
the original code is like this.
else
{
continue;
}
}
break;
}
case UserType.Individual:
{
...
Hi,
I am looking for a way to integrate test framework csUnit and ReSharper 4.x.
I need prepared plugin (better with sources) or sample how to implement such plugin.
Thank you,
Igor.
...
In Resharper when I go back to edit some existing code.. eg. wanting to insert a String.Format into this code:
<td>
<%= Html.Encode(item.Address) %>
</td>
I move the cursor to before 'item' and type in 'String.F', getting Resharper's intellisense completion list that includes the 'Format' method.
However if I press TAB then it r...
VS 2005/2008/2010
I have latest Visual Assist X and Resharper 5.0 installed at the same time. I found some Resharper shortkeys and functionalities just got disable or not working. Does these 2 plugins conflict? How do I check what has been disabled by Visual Assist X in ReSharper? Thanks.
EDIT:
Also, Visual Assist X overlaps some of ...
With my current settings, ReSharper breaks a long line like this:
var attributes =
GetType().GetMethod((string) filterContext.RouteData.Values["action"]).GetCustomAttributes(
typeof (AutomaticRedirectToViewAttribute), false);
I think it's better than not breaking the line at all, but breaking it at the dots of methods/prop...
I am using ReSharper 5's "Reformat Code" feature using default settings and it converting this:
_deviceInstanceView.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate()
{
_deviceInstanceView._DeviceInstanceContainer.UpdateLayout();
});
Into this:
_deviceInstanceView.D...